vault backup: 2025-03-10 16:55:21

This commit is contained in:
Marco Realacci 2025-03-10 16:55:21 +01:00
parent 131672231a
commit 85011b1e0a
2 changed files with 3 additions and 3 deletions

View file

@ -34,9 +34,9 @@
"type": "pdf",
"state": {
"file": "Concurrent Systems/slides/class 3.pdf",
"page": 9,
"page": 10,
"left": -26,
"top": 381,
"top": 499,
"zoom": 0.57541567695962
},
"icon": "lucide-file-text",

View file

@ -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:
- `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!
continuare
**MUTEX:** $p_i$ and $p_j$ cannot simultaneously be in the CS:
*Proof:*
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⟩$$
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
By contradiction, assume that there is a lock but nobody enters its CS