Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please do this in C language . I must have this 3 files , init. c , cpu_emulator. c , scheduler.c Thank you. init process
Please do this in C language. I must have this 3 files, init.c , cpu_emulator.c , scheduler.c
Thank you.
init process fork0 fork0 exec) data sendo emulator process scheduler process send0 recvo data Implement the CPU emulator, which simply receives PCB information, decrements the number of remaining CPU cycles of the PCB by a fixed amount, and sends it back to the scheduler. Implement the scheduler, which reads process data from a file, adds the processes to a queue, then pops the front, sends it to the CPU, receives process data back from the CPU, and appends the process to the back of the queue (if it has not completed yet) Notes: write the CPU emulator, the scheduler, and init processes must be written in C init must use forkO and exec0. For now, we will use blocking IPC- which means your program will stop when waiting for an incoming message. Later, we'll look at non-blocking IPC, which is a little more complicated. init process fork0 fork0 exec) data sendo emulator process scheduler process send0 recvo data Implement the CPU emulator, which simply receives PCB information, decrements the number of remaining CPU cycles of the PCB by a fixed amount, and sends it back to the scheduler. Implement the scheduler, which reads process data from a file, adds the processes to a queue, then pops the front, sends it to the CPU, receives process data back from the CPU, and appends the process to the back of the queue (if it has not completed yet) Notes: write the CPU emulator, the scheduler, and init processes must be written in C init must use forkO and exec0. For now, we will use blocking IPC- which means your program will stop when waiting for an incoming message. Later, we'll look at non-blocking IPC, which is a little more complicatedStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started