Question: 4. Initially: s = 1, t = 0. Thread 1: P(s); V(s); P(t); V(t); Thread 2: P(s); V(s); P(t); V(t); A. Draw the progress graph

4. Initially: s = 1, t = 0. Thread 1: P(s); V(s); P(t); V(t); Thread 2: P(s); V(s); P(t); V(t); A. Draw the progress graph for this program. B. Does it always deadlock? C. If so, what simple change to the initial semaphore values will eliminate the potential for deadlock? D. Draw the progress graph for the resulting deadlock-free program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
