vault backup: 2025-03-10 16:55:21
This commit is contained in:
parent
131672231a
commit
85011b1e0a
2 changed files with 3 additions and 3 deletions
4
.obsidian/workspace.json
vendored
4
.obsidian/workspace.json
vendored
|
@ -34,9 +34,9 @@
|
||||||
"type": "pdf",
|
"type": "pdf",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Concurrent Systems/slides/class 3.pdf",
|
"file": "Concurrent Systems/slides/class 3.pdf",
|
||||||
"page": 9,
|
"page": 10,
|
||||||
"left": -26,
|
"left": -26,
|
||||||
"top": 381,
|
"top": 499,
|
||||||
"zoom": 0.57541567695962
|
"zoom": 0.57541567695962
|
||||||
},
|
},
|
||||||
"icon": "lucide-file-text",
|
"icon": "lucide-file-text",
|
||||||
|
|
|
@ -167,12 +167,12 @@ W.r.t. the execution of $p_j$, it can be that
|
||||||
- this read overlaps with `FLAG[j] <- down` or this read happens when $p_j$ is in the bakery:
|
- this read overlaps with `FLAG[j] <- down` or this read happens when $p_j$ is in the bakery:
|
||||||
- `MY_TURN[j]` has been decided and no write will change it until $p_j$ is in the bakery, and `MY_TURN[j] > 0` of course
|
- `MY_TURN[j]` has been decided and no write will change it until $p_j$ is in the bakery, and `MY_TURN[j] > 0` of course
|
||||||
- When $p_i$ evaluated the second wait for j, it found out that $⟨MY_TURN[i],i⟩ < ⟨MY_TURN[j],j⟩$, good!
|
- When $p_i$ evaluated the second wait for j, it found out that $⟨MY_TURN[i],i⟩ < ⟨MY_TURN[j],j⟩$, good!
|
||||||
continuare
|
|
||||||
|
|
||||||
**MUTEX:** $p_i$ and $p_j$ cannot simultaneously be in the CS:
|
**MUTEX:** $p_i$ and $p_j$ cannot simultaneously be in the CS:
|
||||||
*Proof:*
|
*Proof:*
|
||||||
By contradiction, by Lemma 2 applied twice, we would have:
|
By contradiction, by Lemma 2 applied twice, we would have:
|
||||||
$$⟨MY\_TURN[i] , i⟩ < ⟨MY\_TURN[j] , j⟩ \land ⟨MY\_TURN[j] , j⟩ < ⟨MY\_TURN[i] , i⟩$$
|
$$⟨MY\_TURN[i] , i⟩ < ⟨MY\_TURN[j] , j⟩ \land ⟨MY\_TURN[j] , j⟩ < ⟨MY\_TURN[i] , i⟩$$
|
||||||
|
Which is of course not possible, how in the world is it possible that x < y and y < x at the same time? √
|
||||||
|
|
||||||
#### Deadlock freedom proof
|
#### Deadlock freedom proof
|
||||||
By contradiction, assume that there is a lock but nobody enters its CS
|
By contradiction, assume that there is a lock but nobody enters its CS
|
||||||
|
|
Loading…
Reference in a new issue