Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the init program in C, which will fork off the two child processes. Decide how to implement the two-way IPC. You can use a

Write the init program in C, which will fork off the two child processes.

Decide how to implement the two-way IPC. You can use a TCP socket, a two-way pipe (mkfifo), shared memory*, or two one-way pipes*. Think about why you chose one way over the other, and include a comment about it in your summary write-up. (*you would probably need to use the init program as the CPU emulator for these methods to work).

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).

process list:

process_name, PID, state, priority, interruptable, est_total_run_time, est_remaining_run_time

ls,1000,ready,1,0,360,360 wc,1001,ready,3,0,120,120 cat,1002,ready,2,0,430,430 sed,1003,ready,1,0,411,411 ps,1004,ready,1,0,360,360 grep,1005,ready,2,0,430,430 python,1006,ready,4,0,560,560

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

Recommended Textbook for

MFDBS 89 2nd Symposium On Mathematical Fundamentals Of Database Systems Visegrad Hungary June 26 30 1989 Proceedings

Authors: Janos Demetrovics ,Bernhard Thalheim

1989th Edition

3540512519, 978-3540512516

More Books

Students also viewed these Databases questions

Question

Why is email an area that should be addressed in a code of conduct?

Answered: 1 week ago

Question

Apply your own composing style to personalize your messages.

Answered: 1 week ago

Question

Format memos and e-mail properly.

Answered: 1 week ago