

MCQOPTIONS
Saved Bookmarks
1. |
Two processes P1 and P2, need to access a critical section of code. Consider the following synchronization construct used by the processes :/* P1 *//* P2 */while (true) { while (true){ wants1 = true; wants2 = true; while while (wants 1 = = true); (wants2 = = true); /* Critical /* Critical Section */ Section */ wants2 = false; wants1 = false; } /* Remainder section */ } (/* Remainder Section) Here, wants1 and wants2 are shared variables, which are initialized to false, Which one of the following statements is true about the above construct? |
A. | it does not ensure mutual exclusion |
B. | it does not ensure bounded waiting |
C. | it requires that processes enter the critical section in strict alternation |
D. | it does not prevent deadlocks, but ensures mutual exclusion |
Answer» E. | |