|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ä |
The
shared variable turn
|
|
is
initialized (to 0 or 1)
|
|
|
before
executing any Pi
|
|
|
ä |
Pi’s
critical section is
|
|
|
executed
iff turn = i
|
|
|
ä |
Pi is
busy waiting if Pj
|
|
|
is in
CS: mutual
|
|
|
exclusion
is satisfied
|
|
|
ä |
Progress
requirement is
|
|
|
not
satisfied since it
|
|
|
requires
strict
|
|
|
alternation
of CSs
|
|
|
ä |
Ex:
if turn=0 and P0 is
|
|
|
in
it’s RS, P1 can never
|
|
|
enter
it’s CS
|
|
|
|