Question: 12. (8 points) Given the following information write the order in which the statements are executed. (.5 points awarded per correct statement given in correct

12. (8 points) Given the following information write the order in which the statements are executed. (.5 points awarded per correct statement given in correct order) Assume the following information: P1,P2,P3,P4 all start at the same time, but you cannot predict which process will be scheduled first synch0 and synch1 are semaphores both with initial values of 1 synch0 -1 and synch1 -1 Assume the wait function calls for P1 P2 and P3 are executed before S13 in P4 This means S13 is the first statement ACTUALLY executed and completed Assume, the values of the semaphore can be either positive or negative. You do not need to list the wait and signal calls in your answer. P1 P2 wait(synch1) S1; S2 S3 S4 wait(synchi) S5 S6 S7 S8 P3 P4 wait(synch0) S9 S10; S11; S12; signal (synch1) S13 S14; S15; S16; signal (synch0) signal (synch1) 12. (8 points) Given the following information write the order in which the statements are executed. (.5 points awarded per correct statement given in correct order) Assume the following information: P1,P2,P3,P4 all start at the same time, but you cannot predict which process will be scheduled first synch0 and synch1 are semaphores both with initial values of 1 synch0 -1 and synch1 -1 Assume the wait function calls for P1 P2 and P3 are executed before S13 in P4 This means S13 is the first statement ACTUALLY executed and completed Assume, the values of the semaphore can be either positive or negative. You do not need to list the wait and signal calls in your answer. P1 P2 wait(synch1) S1; S2 S3 S4 wait(synchi) S5 S6 S7 S8 P3 P4 wait(synch0) S9 S10; S11; S12; signal (synch1) S13 S14; S15; S16; signal (synch0) signal (synch1)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
