2,048 views
1 votes
1 votes

Consider the following

Process Pi

while(1)

{

   while(turn != i);

   //critical section

   turn = j;

   //remainder section

}

Process Pj

while(1)

{

   while(turn != j);

   //critical section

   turn = I;

   //remainder section

}

In above case,

  1. Mutual exclusion & progress are not satisfied
  2. Only mutual exclusion is satisfied
  3. Only progress is satisfied
  4. Both mutual exclusion and progress are satisfied

1 Answer

0 votes
0 votes
Mutual exclusion is satisfied as Only one can enter into critical section

but progress is not satisfied

suppose its I's turn but got pre empted before entering into CS. Now j wants to enter into cs, but it cannot enter into CS as its I's turn

Related questions

0 votes
0 votes
2 answers
1
shivajikobardan asked Jul 22, 2023
795 views
Sorry if this is a stupid question. But it really intrigued me. Same resources at different algorithms are telling different ways to test these stuffs.Here's an algorith...
0 votes
0 votes
0 answers
2
Raj Singh 1 asked Jan 1, 2019
1,429 views
Many problems on gateoverflow asks whether the given code satisfies progress requirement of the solution for the critical section problem. Most of these code contain mult...