Process X: Process Y: private i; private i; for (i=0; i < n; i++) { for (i=0; i < n; i++) { a[i] = f(i); EntryY(R, S); ExitX(R, S); b[i]=g(a[i]); } }Which one of the following represents the CORRECT implementations of ExitX and EntryY? (A)
ExitX(R, S) { P(R); V(S); } EntryY (R, S) { P(S); V(R); }(B)
ExitX(R, S) { V(R); V(S); } EntryY(R, S) { P(R); P(S); }(C)
ExitX(R, S) { P(S); V(R); } EntryY(R, S) { V(S); P(R); }(D)
ExitX(R, S) { V(R); P(S); } EntryY(R, S) { V(S); P(R); }
This question is part of this quiz :
OS Process Management