vault backup: 2025-03-24 10:08:11
This commit is contained in:
parent
a3859a8e9c
commit
b99aea1134
3 changed files with 12 additions and 4 deletions
6
.obsidian/workspace.json
vendored
6
.obsidian/workspace.json
vendored
|
@ -51,9 +51,9 @@
|
|||
"type": "pdf",
|
||||
"state": {
|
||||
"file": "Concurrent Systems/slides/class 7.pdf",
|
||||
"page": 9,
|
||||
"page": 10,
|
||||
"left": -23,
|
||||
"top": 171,
|
||||
"top": 175,
|
||||
"zoom": 0.680522565320665
|
||||
},
|
||||
"icon": "lucide-file-text",
|
||||
|
@ -237,6 +237,7 @@
|
|||
"lastOpenFiles": [
|
||||
"Concurrent Systems/slides/class 7.pdf",
|
||||
"Concurrent Systems/notes/7- MUTEX-free concurrency.md",
|
||||
"Pasted image 20250324100652.png",
|
||||
"Pasted image 20250324092633.png",
|
||||
"Pasted image 20250324091452.png",
|
||||
"Concurrent Systems/notes/Pasted image 20250324082534.png",
|
||||
|
@ -265,7 +266,6 @@
|
|||
"Pasted image 20250318090733.png",
|
||||
"Concurrent Systems/slides/class 5.pdf",
|
||||
"Concurrent Systems/notes/images/Pasted image 20250317105355.png",
|
||||
"Concurrent Systems/notes/images/Pasted image 20250317100456.png",
|
||||
"HCIW/slides/4 HUI2016-6-forcefeedback.pdf",
|
||||
"HCIW/slides/3b Haptic slides.pdf",
|
||||
"HCIW/slides/3Haptic interaction.pdf",
|
||||
|
|
|
@ -144,7 +144,15 @@ This is needed for the so called ABA problem with compare&set:
|
|||
if X.compare&set(tmp, v) then ...
|
||||
```
|
||||
- this is to ensure that the value of X has not changed in the computation
|
||||
- the problem is that X can be changed twice before compare&set
|
||||
- the problem is that X can be changed twice before compare&set (e.g. it was A, it became B and than came back to A)
|
||||
- solution: X is a pair ⟨val , seq_numb⟩, with the constraint that each modification of X increases its sequence_number
|
||||
- with the compare&set you mainly test that the sequence_number has not changed
|
||||
|
||||
TOP : a register that can be read or compare&setted
|
||||
![[Pasted image 20250324100652.png]]
|
||||
|
||||
```
|
||||
push(w) :=
|
||||
while true do ⟨i,v,s⟩ <- TOP
|
||||
conclude(i,v,s) if i=k then return FULL newtop ß ⟨i+1,w,STACK[i+1].seq_num+1⟩ if TOP.compare&set(⟨i,v,s⟩,newtop) then return OK
|
||||
```
|
BIN
Pasted image 20250324100652.png
Normal file
BIN
Pasted image 20250324100652.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
Loading…
Add table
Add a link
Reference in a new issue