vault backup: 2025-03-03 20:35:00
This commit is contained in:
parent
eed4d2d185
commit
b6a4a342cc
2 changed files with 10 additions and 27 deletions
|
@ -239,4 +239,12 @@ Induction (true for ℓ+1, to be proved for ℓ):
|
|||
|
||||
##### Peterson algorithm cost
|
||||
- $n$ MRSW registers of $\lceil \log_{2} n\rceil$ bits (FLAG)
|
||||
- $n-1$ MRMW
|
||||
- $n-1$ MRMW registers of $\lceil \log_{2}n \rceil$ bits (AFTER_YOU)
|
||||
- $(n-1)\times(n+2)$ accesses for locking and 1 access for unlocking
|
||||
|
||||
It satisfies MUTEX and starvation freedom. It does not satisfy bounded bypass:
|
||||
- consider 3 processes, one sleeping in its first wait, the others alternating in the CS
|
||||
- when the first process wakes up, it can pass to level 2 and eventually win
|
||||
- but the sleep can be arbitrary long and in the meanwhile the other two processes may have entered an unbounded number of CSs
|
||||
|
||||
Easy to generalize to k-MUTEX.
|
Loading…
Add table
Add a link
Reference in a new issue