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

@ -215,6 +215,7 @@
"lastOpenFiles": [
"Concurrent Systems/slides/class 10.pdf",
"Concurrent Systems/notes/10 - Consensus Implementation.md",
"Pasted image 20250401092557.png",
"Pasted image 20250401083747.png",
"Concurrent Systems/notes/3a - Hardware primitives & Lamport Bakery algorithm.md",
"Concurrent Systems/notes/3b - Aravind's algorithm and improvements.md",
@ -249,7 +250,6 @@
"Concurrent Systems/notes/Untitled.pdf",
"Concurrent Systems/notes/images/Pasted image 20250318090909.png",
"Concurrent Systems/notes/images/Pasted image 20250318090733.png",
"Pasted image 20250318090909.png",
"HCIW/notes/2 - Interface and Interaction for IoT.md",
"HCIW/notes/3 - Beacons.md",
"Concurrent Systems/notes/1 - CS Basics2.md",

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB