vault backup: 2025-03-24 10:03:11

This commit is contained in:
Marco Realacci 2025-03-24 10:03:11 +01:00
parent 1cc08d5391
commit a3859a8e9c

View file

@ -138,4 +138,13 @@ Idea: every operation is started by the invoking process and finalized by the ne
This is needed for the so called ABA problem with compare&set: This is needed for the so called ABA problem with compare&set:
- A typical use of compare&set is - A typical use of compare&set is
```stm``` ```
stmp <- X
...
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
- 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