Consider the methods used by processes P1 and P2 to access their critical…

GATE · Computer Science · 2010

Consider the methods used by processes P1 and P2 to access their critical sections whenever needed. The initial values of the shared Boolean variables S1 and S2 are assigned arbitrarily.

Method used by P1

Method used by P2

while (S1 == S2);
critical section
S1 = S2;
while (S1 != S2);
critical section
S2 = not(S1);

Which statement describes the properties achieved by these methods?

  1. A.

    Mutual exclusion but not progress

  2. B.

    Progress but not mutual exclusion

  3. C.

    Neither mutual exclusion nor progress

  4. D.

    Both mutual exclusion and progress

Attempted by 326 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…