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

@ -34,9 +34,9 @@
"type": "pdf", "type": "pdf",
"state": { "state": {
"file": "Concurrent Systems/slides/class 3.pdf", "file": "Concurrent Systems/slides/class 3.pdf",
"page": 14, "page": 15,
"left": -26, "left": -26,
"top": 41, "top": 106,
"zoom": 0.57541567695962 "zoom": 0.57541567695962
}, },
"icon": "lucide-file-text", "icon": "lucide-file-text",
@ -218,6 +218,7 @@
}, },
"active": "6edd4157a160e462", "active": "6edd4157a160e462",
"lastOpenFiles": [ "lastOpenFiles": [
"Pasted image 20250310103703.png",
"Concurrent Systems/slides/class 3.pdf", "Concurrent Systems/slides/class 3.pdf",
"Concurrent Systems/notes/3.md", "Concurrent Systems/notes/3.md",
"Concurrent Systems/notes/1 - CS Basics.md", "Concurrent Systems/notes/1 - CS Basics.md",

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]$ - 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) - $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) - 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:

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB