What is progress and limited expectation in a "critical partition algorithm"?

Consider the following code

  //proces i:                             //proces j:

  flag[i] = true;                         flag[j] = true;
  turn = j;                               turn = i;
  while(flag[j] == true && turn==j);       while(flag[i] == true && turn == i);

  <critical section>                      <critical section>

  flag[i] = false;                        flag[j] = false;

  <remainder section                      <remainder section>

I am sure that the code above satisfies the mutual exclusion property, but I am not sure about the following

  • What does it mean progress? and whether the above code matches. The code above requires that the critical section be executed in strict alternation. Does it count progress?

  • From what I see, the above code does not support any information about the number of times the process has entered a critical section, does this mean that the above code does not satisfy bounded waiting?

+4
source share
2

Progress , , , - , , - . , , .

Bounded waiting , , , - , , , , , ( - , - ).

+7
  • , , , ! , j , , , ! SO, .

  • , , , , , . .

, , , .

, !

+6

All Articles