vault backup: 2025-04-01 09:29:49
This commit is contained in:
parent
84cf6bd52c
commit
e7f53756b3
3 changed files with 24 additions and 1 deletions
2
.obsidian/workspace.json
vendored
2
.obsidian/workspace.json
vendored
|
@ -215,6 +215,7 @@
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
"Concurrent Systems/slides/class 10.pdf",
|
"Concurrent Systems/slides/class 10.pdf",
|
||||||
"Concurrent Systems/notes/10 - Consensus Implementation.md",
|
"Concurrent Systems/notes/10 - Consensus Implementation.md",
|
||||||
|
"Pasted image 20250401092557.png",
|
||||||
"Pasted image 20250401083747.png",
|
"Pasted image 20250401083747.png",
|
||||||
"Concurrent Systems/notes/3a - Hardware primitives & Lamport Bakery algorithm.md",
|
"Concurrent Systems/notes/3a - Hardware primitives & Lamport Bakery algorithm.md",
|
||||||
"Concurrent Systems/notes/3b - Aravind's algorithm and improvements.md",
|
"Concurrent Systems/notes/3b - Aravind's algorithm and improvements.md",
|
||||||
|
@ -249,7 +250,6 @@
|
||||||
"Concurrent Systems/notes/Untitled.pdf",
|
"Concurrent Systems/notes/Untitled.pdf",
|
||||||
"Concurrent Systems/notes/images/Pasted image 20250318090909.png",
|
"Concurrent Systems/notes/images/Pasted image 20250318090909.png",
|
||||||
"Concurrent Systems/notes/images/Pasted image 20250318090733.png",
|
"Concurrent Systems/notes/images/Pasted image 20250318090733.png",
|
||||||
"Pasted image 20250318090909.png",
|
|
||||||
"HCIW/notes/2 - Interface and Interaction for IoT.md",
|
"HCIW/notes/2 - Interface and Interaction for IoT.md",
|
||||||
"HCIW/notes/3 - Beacons.md",
|
"HCIW/notes/3 - Beacons.md",
|
||||||
"Concurrent Systems/notes/1 - CS Basics2.md",
|
"Concurrent Systems/notes/1 - CS Basics2.md",
|
||||||
|
|
|
@ -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
|
- 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
|
- 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
|
BIN
Pasted image 20250401092557.png
Normal file
BIN
Pasted image 20250401092557.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
Loading…
Add table
Add a link
Reference in a new issue