vault backup: 2025-04-01 09:29:49

This commit is contained in:
Marco Realacci 2025-04-01 09:29:49 +02:00
parent 84cf6bd52c
commit e7f53756b3
3 changed files with 24 additions and 1 deletions

View file

@ -106,3 +106,26 @@ Let S be a schedule of operations only from r that leads p(q(C)) to a deci
- Since r cannot see any difference between p(q(C)) and q(p(C)), if we run S from q(p(C)) we must decide 1 as well
- in contradiction with q(p(C')) be 0-val
### CN(Swap) = CN(Fetch&add) = 2
```
...
```
### CN(Compare&swap) = ∞
Let us consider a verison of the compare&swap where, instead of returning a boolean, it always returns the previous value of the object, i.e.:
![[Pasted image 20250401092557.png]]
```
CS a compare&swap object init at ⊥
propose(v) :=
tmp <- CS.compare&swap(, v)
if tmp = ⊥ then
return v
else
return tmp
```
Exercise: devise a consensus object with `CN = ∞` by using the compare&swap