Process synchronization problem
Explanations for the truth-value of each assertion:

(1) is true because any process running P() after another process has already run P() will see y==1 and so be stuck in the do-loop.  If context-switching is disabled inside P() [and we assume re-enabled on exit from P()], then the process stuck in the do-loop will be the ONLY running process, so no other process can release that one from the do-loop by calling V().

(2) is false because a context-switch may occur between the load of y and the store to x.  Consider processes P1, P2, both calling P().  The following sequence is possible: (a) P1 loads y, which happens to be 0; (b) The context switches to P2; (c) P2 loads y -which is still 0-, then sets x to 1 and exits the loop (because for it y==0) and enters the critical section; (d) The context switches back to P1, which now sets x to 1 -but still sees its version of y as 0, so it exits the loop and enters the critical section.  Verdict: Mutual-exclusion is NOT enforced!

(3) The implementation of V() is not wrong, given the implementation of P().  Execution of V() WILL set 'value' to 0, and by the atomicity property this must occur either entirely before or entirely after any test_and_set.  If before, then test_and_set will set y to 0 immediately; if after, the same thing will happen on the next do-loop iteration.

(4) [because of 2 &amp; 3].