GATEverse
← GATE CSE 2016 Set 2

Q48

MCQ2 marks, −0.67

Consider the following two-process synchronization solution.

PROCESS 0 Process 1 Entry: loop while (turn == 1); Entry: loop while (turn == 0);(critical section) (critical section)Exit: turn = 1;Exit turn = 0; \begin{array}{|l|l|}\hline \text{PROCESS 0 } & \text{Process 1 }\\ \\ \text{Entry: loop while (turn == 1); } & \text{Entry: loop while (turn == 0);} \\ \quad\text{(critical section)} &\quad \text{ (critical section)} \\ \text{Exit: turn = 1;} & \text{Exit turn = 0; }\\ \\\hline \end{array}

The shared variable turn is initialized to zero. Which one of the following is TRUE?

Sign in to save attempts.

Loading…