vault backup: 2025-03-10 09:35:11
This commit is contained in:
parent
d53e1037ad
commit
a21e507d65
2 changed files with 15 additions and 6 deletions
11
.obsidian/workspace.json
vendored
11
.obsidian/workspace.json
vendored
|
@ -34,10 +34,10 @@
|
|||
"type": "pdf",
|
||||
"state": {
|
||||
"file": "Concurrent Systems/slides/class 3.pdf",
|
||||
"page": 8,
|
||||
"left": -36,
|
||||
"top": 151,
|
||||
"zoom": 0.4382422802850356
|
||||
"page": 7,
|
||||
"left": -26,
|
||||
"top": 213,
|
||||
"zoom": 0.57541567695962
|
||||
},
|
||||
"icon": "lucide-file-text",
|
||||
"title": "class 3"
|
||||
|
@ -100,7 +100,8 @@
|
|||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 307.5
|
||||
"width": 307.5,
|
||||
"collapsed": true
|
||||
},
|
||||
"right": {
|
||||
"id": "bc4b945ded1926e3",
|
||||
|
|
|
@ -146,4 +146,12 @@ Se il ticket number è minore si ottiene l'accesso, se il ticket number è ugual
|
|||
|
||||
> It is possible that while reading, other processes are writing their turn! So it's possible that I read something unpredictable! We need to consider it in the proofs.
|
||||
|
||||
Why is the flag needed? Without it, if two process $i$ and $j$ sets my_turn at the same time, t
|
||||
###### Why is the flag needed?
|
||||
Without it, if two process $i$ and $j$ sets MY_TURN at the same time, then $i$ goes to sleep, $j$ enters the CS, but when $i$ wakes up, it will enter too!
|
||||
|
||||
#### MUTEX proof
|
||||
**Lemma 1:** if $p_i$ enters the bakery before $p_j$, then `MY_TURN[i] < MY_TURN[j]`.
|
||||
|
||||
*Proof:*
|
||||
- let t be the value of `MY_TURN[i]` after $p_{i}$ exits the doorway (after flag <- down)
|
||||
- when $p_j$ computes its ticket, it reads $t$ from `MY_TURN[i]`, it reads t from MY_TURNpi
|
Loading…
Reference in a new issue