Question: Question 2: Marks: 101 Given below is the pseudocode to synchronize processes P1, P2, P3, P4, P5, and P6 by using three semaphores X, Y

Question 2: Marks: 101 Given below is the pseudocode to synchronize processes P1, P2, P3, P4, P5, and P6 by using three semaphores X, Y and Z that are initialized as follow: X=-1, Y=2, Z=-1. The Operating System can schedule the processes which are ready to execute in any order. List down at least 5 possible orders of execution in which the processes can run. PI P2 P3 P4 PS P6 Wait(X) Wait(Y) Print P3 Wait(Y) Wait(Y) Wait(Z) Print P1 Print P2 Signal(X) Print P4 Print P5 Print P6 Signal(Y) Signal(Z) Signal(X) Signal(Z)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
