vault backup: 2025-03-10 19:17:05

This commit is contained in:
Marco Realacci 2025-03-10 19:17:05 +01:00
parent 7b0d65e4eb
commit 2dda66edd7

View file

@ -262,6 +262,9 @@ 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: It looks like I can experience at most $2n-1$ other critical sections, but it is even better, let's see:
- $p_n$ invokes lock alone, completes its CS (the first after the reset) and its new DATE is n+1 - $p_n$ invokes lock alone, completes its CS (the first after the reset) and its new DATE is n+1
- all processes invoke lock simultaneously - all processes invoke lock simultaneously
- $p_{n}$ has to wait all other processes to complete their CSs
- when $p_{n-1}$ completes its CS, its new DATE will be $n+(n-1)+1=2n$ -> RESET
- now all $p_{1}\dots p_{n-1}$ invoke lock again and complete their CSs (after that $p_i$ completes its CS, now it has `DATE[i] <- n+i`)
#### Improvement of Aravinds algorithm #### Improvement of Aravinds algorithm