Question: Let's say you have a system with three processes (X, Y, and Z) and a single CPU. Process X has the highest priority, process Z

Let's say you have a system with three processes (X, Y, and Z) and a single CPU. Process X has the highest priority, process Z has the lowest priority, and Y is in the middle. Suppose there is a priority-based process execution mechanism (the operating system will run the highest priority process, it can pull back a lower process if necessary. Pullback: It can take the CPU from a running process only if or if a higher priority process becomes available, otherwise processes will continue to run until they are terminated). All processes can be in one of five states: RUNNING, READY, WAITING, NEW, and TERMINATED. Given the following process behaviors cumulatively, specify the state of the desired processes AFTER the relevant step and all previous steps have taken place.

Step 1: Process X is loaded into memory and started; It is the only process in the system. What state is process X in?

Step 2: Process X calls the fork() system call and creates process Y. What state is process X in? What state is process Y in?

Step 3: The running process sends an I/O request to the disk. What state is process X in? What state is process Y in?

Step 4: The running process calls fork() and creates process Z. What state is process X in? What state is process Y in? What state is the Z process in?

Step 5: The previously issued I/O request is completed. What state is process X in? What state is process Y in? What state is the Z process in?

Step 6: The running process terminates. What state is process X in? What state is process Y in? What state is the Z process in?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!