Multiple choice

Two processes, P1 and P2, need to access a critical section of code. Consider the following synchronization construct used by the processes:

Here, wants1 and wants2 are shared variables, which are initialized to false. Which one of the following statements is TRUE about the above construct?

  1. It does not ensure mutual exclusion.

  2. It does not ensure bounded waiting.

  3. It requires that processes enter the critical section in strict alternation.

  4. It does not prevent deadlocks, but ensures mutual exclusion.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation