Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

image text in transcribed

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 complicated

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions