vault backup: 2025-03-10 22:23:12
This commit is contained in:
parent
a67c8416a2
commit
0982714f83
1 changed files with 11 additions and 0 deletions
|
@ -80,3 +80,14 @@ unlock(i) :=
|
|||
|
||||
Since the LOCK is like before, the revised protocol satisfies MUTEX. Furthermore, you can prove that it satisfies bounded bypass with bound n-1 -> EXERCISE!
|
||||
|
||||
Let's remember ourselves how is the locking function defined:
|
||||
```
|
||||
lock(i) :=
|
||||
FLAG[i] <- up
|
||||
repeat
|
||||
STAGE[i] <- 0
|
||||
wait (foreach j != i, FLAG[j] = down OR DATE[i] < DATE[j])
|
||||
STAGE[i] <- 1
|
||||
until foreach j != i, STAGE[j] = 0
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue