vault backup: 2025-03-04 09:09:45
This commit is contained in:
parent
961031708a
commit
d49c23ade6
1 changed files with 18 additions and 0 deletions
|
@ -80,3 +80,21 @@ Let $p_i$ invoke lock
|
||||||
esercizio: prova che NON soddisfa starvation freedom
|
esercizio: prova che NON soddisfa starvation freedom
|
||||||
|
|
||||||
#### From deadlock freedom to bounded bypass
|
#### From deadlock freedom to bounded bypass
|
||||||
|
-> Round Robin algorithm
|
||||||
|
|
||||||
|
Let DLF be any deadlock free protocol for MUTEX. Let's see how we can make it starvation free:
|
||||||
|
|
||||||
|
```
|
||||||
|
metti algoritmo qui
|
||||||
|
lock(i) :=
|
||||||
|
FLAG[i] <- up
|
||||||
|
wait (TURN = i OR FLAG[TURN] = down)
|
||||||
|
DLF.lock(i)
|
||||||
|
return
|
||||||
|
|
||||||
|
unlock(i) :=
|
||||||
|
FLAG[i] <- down
|
||||||
|
if FLAG
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue