vault backup: 2025-03-04 08:34:45
This commit is contained in:
parent
62d5142515
commit
4a23786582
1 changed files with 7 additions and 2 deletions
|
@ -14,8 +14,13 @@ lock(i) :=
|
||||||
if Y != ⊥ then FAIL
|
if Y != ⊥ then FAIL
|
||||||
else Y <- i
|
else Y <- i
|
||||||
if X = i then return
|
if X = i then return
|
||||||
else fail
|
else FAIL
|
||||||
|
|
||||||
unlock(i) :=
|
unlock(i) :=
|
||||||
Y <- ⊥
|
Y <- ⊥
|
||||||
return
|
return
|
||||||
|
```
|
||||||
|
|
||||||
|
Problems:
|
||||||
|
- we don't want the FAIL
|
||||||
|
- it is possible to have an execution where nobody accesses its CS, if repeated forever it entails a deadlock
|
Loading…
Reference in a new issue