|
|
|
|
|
|
|
|
|
|
|
|
|
n |
We consider
first the case of 2 processes
|
|
|
u |
Algorithm 1 and 2
are incorrect
|
|
|
|
u |
Algorithm 3 is
correct (Peterson’s algorithm)
|
|
|
n |
Then we
generalize to n processes
|
|
|
|
u |
the bakery
algorithm
|
|
|
n |
Notation
|
|
|
|
u |
We start with 2
processes: P0 and P1
|
|
|
|
u |
When presenting
process Pi, Pj always
|
|
|
|
denotes the other
process (i != j)
|
|