Software Solution 2 (incomplete)
Only two processes.
Local process is i, other is j.
What is good ?
What is bad ?
Shared flag: array [0..1] of boolean=[false, false];
Repeat
flag[ i ] := true;
while flag[ j ] do no-op;
critical section
flag[ i ] := false;
remainder section
Forever
Previous slide
Next slide
Back to first slide
View graphic version