diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index e9c0119..b5912ca 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -34,9 +34,9 @@ "type": "pdf", "state": { "file": "Concurrent Systems/slides/class 5.pdf", - "page": 2, + "page": 4, "left": -27, - "top": 266, + "top": 379, "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 5213517..c0e56c4 100644 --- a/Concurrent Systems/notes/5 - Software Transactional Memory.md +++ b/Concurrent Systems/notes/5 - Software Transactional Memory.md @@ -23,4 +23,12 @@ The key issue is ensuring consistency of the shared memory Implementation: every transaction uses a local working space - For every shared register: the first READ copies the value of the reg. in the local copy; successive READs will then read from the local copy -- Every WRITE modifies the local copy and puts the final \ No newline at end of file +- Every WRITE modifies the local copy and puts the final value in the shared memory only at the end of the transaction (if it has not been aborted) + +4 operations: +- `begin_T()`: initializes the local control variables +- `X.read_T(), X.write_T()`: described above +- `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