/* P1 */
while (true) {
wants1 = true;
/*preempt here*/
while (wants2 == true);
/* Critical Section */
wants1 = false;
}
/* Remainder section */
|
/* P2 */
while (true) {
wants2 = true;
/*preempt here*/
while (wants1 == true);
/* Critical Section */
wants2=false;
}
/* Remainder section */
|
So, deadlock. (Technically, a livelock, because processes are "alive" — they're not doing anything, just busy-waiting forever. In deadlock, processes are blocked.)
Clearly, it guarantees Mutual Exclusion. Because, when the other process wants to enter the CS, the current process would not try to enter.
So, Option D.
Other options are wrong. No bounded waiting, because if a process wants to enter infinite times, it can. There's no "bound" (restriction) on the waiting time of the other process(es).
This also negates strict alteration.