vault backup: 2025-03-10 10:40:13

This commit is contained in:
Marco Realacci 2025-03-10 10:40:13 +01:00
parent a03d441faa
commit 4f3268bda9
3 changed files with 13 additions and 3 deletions

View file

@ -246,4 +246,13 @@ unlock(i) :=
- Otherwise let $p_j$ be the process that enters, its next date is $n+1 > DATE[i]$
- $p_{j}$ cannot surpass $p_i$ again (before a RESET)
- The worst case is then all processes perform lock together and $i = n$ (i am process n)
- all $p_{1}\dots p_{n}$ surpass $
- all $p_{1}\dots p_{n}$ surpass $p_{n}$
- then $p_n$ enters and it resets the DATE in its unlock
- only 1 reset and it is the worst case!
**Theorem:** the algorithm satisfies bounded bypass with bound $2n-2$.
*Proof:*
![[Pasted image 20250310103703.png]]
so by this, the very worst possible case is that my lock experiences that.
It looks like I can experience at most $2n-1$ other critical sections, but it is even better, let's see: