vault backup: 2025-03-08 17:46:57
This commit is contained in:
parent
8efa7b29fa
commit
561e4939e7
2 changed files with 8 additions and 11 deletions
2
.obsidian/workspace.json
vendored
2
.obsidian/workspace.json
vendored
|
@ -196,6 +196,7 @@
|
|||
"active": "802d9ec58484849d",
|
||||
"lastOpenFiles": [
|
||||
"Concurrent Systems/notes/Lezione2.md",
|
||||
"Concurrent Systems/notes/1 - CS Basics.md",
|
||||
"HCIW/slides/Interface and Interaction for IoT.pdf",
|
||||
"Pasted image 20250305182542.png",
|
||||
"HCIW/notes/3 - Beacons.md",
|
||||
|
@ -215,7 +216,6 @@
|
|||
"Concurrent Systems/notes/images/Pasted image 20250304090207.png",
|
||||
"Concurrent Systems/notes/images/Pasted image 20250304084901.png",
|
||||
"Concurrent Systems/notes/images/Pasted image 20250304084537.png",
|
||||
"Concurrent Systems/notes/1 - CS Basics.md",
|
||||
"Concurrent Systems/slides/class 1.pdf",
|
||||
"Data and Network Security/slides/2025 - DNS - Lecture 2.pdf",
|
||||
"Concurrent Systems/notes/images/Pasted image 20250303093116.png",
|
||||
|
|
|
@ -92,20 +92,17 @@ Every solution to a problem should satisfy at least:
|
|||
>[!warning] So safety is necessary for correctness, liveness for meaningfulness.
|
||||
|
||||
##### In the context of MUTEX:
|
||||
- **Safety:** there is at most one process at a time in a CS.
|
||||
- **Safety:** there is at most one process at a time in a CS (*mutual exclusion*).
|
||||
- **Liveness:**
|
||||
- **Deadlock freedom:** if there is at least one invocation of lock, eventually after at least one process enters a C.S.
|
||||
- **Starvation freedom:** every invocation of lock eventually grants access to the associated C.S.
|
||||
- **Bounded bypass:** let $n$ be the number of processes; then, there exists $f: N \to N$ s.t. every lock enters the C.S. after at most $f(n)$ other C.S.s (The process must win in at most f(n) steps).
|
||||
- **Deadlock freedom:** if there is at least one invocation of `lock`, one process will eventually enter the critical section. This means that **the system is not blocked forever**.
|
||||
- **Starvation freedom:** every invocation of lock eventually grants access to the associated CS (a process won't be stuck forever while other processes are racing for the CS).
|
||||
- **Bounded bypass:** like starvation freedom, but stronger! We define an upper bound on the number of failures. Let $n$ be the number of processes; then, there exists $f: N \to N$ s.t. every lock enters the C.S. after at most $f(n)$ other CSs (The process must enter the CS in at most $f(n)$ steps).
|
||||
|
||||
todo: riscrivere meglio l'ultimo
|
||||
|
||||
|
||||
Both inclusions are strict:
|
||||
Deadlock freedom $\not{\implies}$ Starvation freedom
|
||||
**Both inclusions are strict:**
|
||||
$$\text{Deadlock freedom} \not \implies \text{Starvation freedom}$$
|
||||
![[Pasted image 20250303093116.png]]
|
||||
|
||||
Starvation freedom $not \implies$ Bounded bypass
|
||||
Starvation freedom $\not \implies$ Bounded bypass
|
||||
Assume a $f$ and consider the scheduling above, where p2 wins $f(3)$ times and so does p3, then p1 looses (at least) $2f(3)$ times before winning.
|
||||
|
||||
### Atomic R/W registers
|
||||
|
|
Loading…
Reference in a new issue