From c1c145bbb3123be878ccd8ecad34ecbe080c1f0b Mon Sep 17 00:00:00 2001 From: Marco Realacci Date: Mon, 17 Mar 2025 10:39:23 +0100 Subject: [PATCH] vault backup: 2025-03-17 10:39:23 --- .obsidian/workspace.json | 4 ++-- .../notes/5 - Software Transactional Memory.md | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index b5912ca..e52fb22 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -34,9 +34,9 @@ "type": "pdf", "state": { "file": "Concurrent Systems/slides/class 5.pdf", - "page": 4, + "page": 3, "left": -27, - "top": 379, + "top": 70, "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 c0e56c4..01176dd 100644 --- a/Concurrent Systems/notes/5 - Software Transactional Memory.md +++ b/Concurrent Systems/notes/5 - Software Transactional Memory.md @@ -31,4 +31,19 @@ Implementation: every transaction uses a local working space - `try_to_commit_T()`: decides whether a transaction (non-aborted) can commit #### A Logical Clock based STM system -All the READs perform if no inconsistencies arise, or before any inconsistency \ No newline at end of file +All the READs perform if no inconsistencies arise, or before any inconsistency + +Let T be a transaction; its read prefix is formed by all its successful READ before its possible abortion. +An execution is **opaque** if all committed transactions and all the read prefixes of all aborted transactions appear if executed one after the other, by following their real-time occurrence order. + +We now present an atomic STM system, called *Transactional Locking 2*: +- CLOCK is an atomic READ/FETCH&ADD register initialized at 0 +- Every MRMW register X is implemented by a pair of register XX s.t. + - XX.val contains the value of X + - XX.date contains the date (in terms of CLOCK) of the last update + - it is associated with a lock object to guarantee MUTEX when updating the shared memory +- For every transaction T, the invoking process maintains + - `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