diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index e52fb22..f7a0e79 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -34,9 +34,9 @@ "type": "pdf", "state": { "file": "Concurrent Systems/slides/class 5.pdf", - "page": 3, + "page": 4, "left": -27, - "top": 70, + "top": 123, "zoom": 0.5754156769596199 }, "icon": "lucide-file-text", diff --git a/Concurrent Systems/notes/5 - Software Transactional Memory.md b/Concurrent Systems/notes/5 - Software Transactional Memory.md index 01176dd..9eb3feb 100644 --- a/Concurrent Systems/notes/5 - Software Transactional Memory.md +++ b/Concurrent Systems/notes/5 - Software Transactional Memory.md @@ -46,4 +46,14 @@ We now present an atomic STM system, called *Transactional Locking 2*: - `lc(XX)`: a local copy of the implementation of reg. X - `read_set(T)`: the set of names of all the registers read by T up to that moment - `write_set(T)`: the set of names of all the registers written by T up to that moment - - `birthdate(T)`: the value of CLOCK(+1) at the starting of \ No newline at end of file + - `birthdate(T)`: the value of CLOCK(+1) at the starting of T + +**Idea:** commit a transaction if and only if (iff) it could appear as executed at its birthdate time +**Consistency:** +- if T reads X, then it must be that `XX.date < birthdate(T)` +- to commit, all registers accessed by T cannot have been modified after T's birthdate (again, `XX.date < birthdate(T)`) + +###### Implementation: +``` +poi la scrivo giuro +```