vault backup: 2025-03-10 09:40:11

This commit is contained in:
Marco Realacci 2025-03-10 09:40:11 +01:00
parent a21e507d65
commit 8d09674312
2 changed files with 14 additions and 6 deletions

View file

@ -154,4 +154,13 @@ Without it, if two process $i$ and $j$ sets MY_TURN at the same time, then $i$ g
*Proof:*
- let t be the value of `MY_TURN[i]` after $p_{i}$ exits the doorway (after flag <- down)
- when $p_j$ computes its ticket, it reads $t$ from `MY_TURN[i]`, it reads t from MY_TURNpi
- when $p_j$ computes its ticket, it reads $t$ from `MY_TURN[i]`, it reads t from `MY_TURN[i]` (no write overlapping with this read)
- Hence, `MY_TURN[j]` is at least $t+1$.
**Lemma 2:** Let $p_i$ be in the CS and $p_j$ is in the doorway or in the bakery; then, $$⟨MY\_TURN[i] , i⟩ < ⟨MY\_TURN[j] , j⟩$$*Proof:*
If $p_i$ is in the CS, it has terminated its first wait for $j$
let's consider the read of `FLAG[j]` done by $p_i$ that terminates such wait
W.r.t. the execution of $p_j$, it can be that
- this read overlaps with `FLAG[j] <- up` by Lemma 1, `MY_TURN[i] < MY_TURN[j]` and ok
- this read is contained within the computation of `MY_TURN[j]`, but it's not possible, since `MY_TURN` is computed with the