Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You will implement a producer - consumer paradigm, readers - writers, using shared memory. First a parent process should be launched. Then it should

 

You will implement a producer - consumer paradigm, readers - writers, using shared memory. First a parent process should be launched. Then it should spawn 2 children processes. Each child process can communicate with the parent and visa - versa. There are several related goals for this assignment: Implement the Spawn, Waitpid, and Exit() system calls. These calls will allow user processes to create new user processes. Spawn will involve loading a user program from a file and then running it. . Do some basic keyboard I/O, implementing Putchar() and Getchar() for user programs. Write a simple shell for Minix with support for Spawn() and Waitpid(). . Defined a shared memory, i.e. mailbox, from the parent to the children. The memory must be shared among all children as you need to implement readers - writers synchronization paradigm. Write a program and the necessary traps to display a list of all running processes (spawned from the shell, and otherwise). This list should include the program name, ID, mode (user/system) and state (running, ready, waiting, etc.) for each process in the system. In other words, this program would do the same thing as ps does on Unix. You'll need at least one new trap to implement this, and I'd suggest two traps (one to get the list of process IDs and one to find information about each process). Keep in mind that returning strings from a trap could be difficult. To do this, you'll need to understand traps, shared memory, process creation and deletion, basic file I/O, and keyboard I/O. You'll also have to do some work on synchronizing user processes using the Locks and Condition variables.

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

Entrepreneurship

Authors: Andrew Zacharakis, William D Bygrave

5th Edition

1119563097, 9781119563099

More Books

Students also viewed these General Management questions