- Shared variables:
- int turn;
- initially turn = 0
- turn - i Þ Pi can enter its critical section
- Process Pi
do {
while (turn != i) ;
critical section
turn = j;
reminder section
} while (1);
- Satisfies mutual exclusion, but not progress
No comments:
Post a Comment