vault backup: 2025-03-03 10:31:24

This commit is contained in:
Marco Realacci 2025-03-03 10:31:24 +01:00
parent e9dd86ab87
commit 3a122c3833

View file

@ -206,4 +206,15 @@ unlock(i) :=
```
We say that pi is at level h when it exits from the h-th wait -> a process at level h is at any level <= h
##### MUTE
##### MUTEX proof
Lemma: for every $ \in \{0,\dots,n-1\}$ , at most n- processes are at level , this implies MUTEX by taking = n-1
Proof by induction on
Base (=0): trivial
Induction (true for , to be proved for +1):
- p at level can increase its level by writing its FLAG at +1 and its index in $A_Y[+1]$
- let $p_x$ be the last one that writes `A_Y[+1]`, so `A_Y[+1]=x`
- for $p_x$ to pass at level +1, it must be that $∀k≠x. F[k] < +1$, then $p_x$ is the only proc at level +1 and the thesis holds, since 1<=n--1
- otherwise, $p_x$ is blocked in the wait and so we have at most n--1