Question: Please elaborate on how you figured out the solution for each subQuestion! I already have the answers, just need clarification on how/why each answer is
Please elaborate on how you figured out the solution for each subQuestion! I already have the answers, just need clarification on how/why each answer is considered correct. :)
Answers: (Please help explain how each answer is correct!)
26) E
27) B

# Figure 6 # Initialization of shared variables: flag [0] turn -0; flag [1] false; = Entry section: flag[i] - true; turn j; do ( while (flag [j] and (turn-)) Exit section: flag [i] false; 26. Consider Figure 6. Assume two processes (Pi and Pj) share a critical resource. If both of the processes use the entry and exit sections correctly to guard their critical sections, which of the following is correct? A) Starvation may occur B) Deadlock may occur C) A violation of mutual exclusion may occur. D) All of the above. E) None of the above. 27. Consider Figure 6. Assume two processes (Pi and Pj) share a critical resource. If one of the processes use the entry and exit sections correctly to guard its critical section, but the other process omits the exit section, which of the following is correct? A) Starvation may occur. B) Deadlock may occur C) A violation of mutual exclusion may occur. D) All of the above. E) None of the above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
