|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
n |
Keep 1 Bool variable for
|
|
|
each process:
flag[0] and
|
|
|
|
flag[1]
|
|
|
n |
Pi signals
that it is ready to
|
|
|
enter it’s CS
by:
|
|
|
flag[i]:=true
|
|
|
n |
Mutual
Exclusion is
|
|
|
satisfied but
not the
|
|
|
|
progress
requirement
|
|
|
n |
If we have
the sequence:
|
|
|
|
u |
T0: flag[0]:=true
|
|
|
|
u |
T1: flag[1]:=true
|
|
|
n |
Both process
will wait
|
|
|
forever to
enter their CS:
|
|
|
we have a deadlock
|
|
|
|