From a2e91be4327e0985a1197487380275d00bccdc57 Mon Sep 17 00:00:00 2001 From: Marco Realacci Date: Wed, 2 Apr 2025 12:31:12 +0200 Subject: [PATCH] vault backup: 2025-04-02 12:31:12 --- .obsidian/workspace.json | 19 ++++++++++--------- ...e primitives & Lamport Bakery algorithm.md | 4 ++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 9da7598..5602dba 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -28,15 +28,16 @@ "state": { "type": "markdown", "state": { - "file": "Concurrent Systems/notes/3b - Aravind's algorithm and improvements.md", + "file": "Concurrent Systems/notes/3a - Hardware primitives & Lamport Bakery algorithm.md", "mode": "source", "source": false }, "icon": "lucide-file", - "title": "3b - Aravind's algorithm and improvements" + "title": "3a - Hardware primitives & Lamport Bakery algorithm" } } - ] + ], + "currentTab": 1 } ], "direction": "vertical" @@ -205,12 +206,15 @@ "companion:Toggle completion": false } }, - "active": "483215723737b6f7", + "active": "0b5880764d0a0d29", "lastOpenFiles": [ + "Concurrent Systems/notes/3b - Aravind's algorithm and improvements.md", + "Concurrent Systems/notes/4 - Semaphores.md", + "Concurrent Systems/notes/5 - Software Transactional Memory.md", + "Concurrent Systems/notes/4c - Dining Philosophers.md", + "Concurrent Systems/notes/1b - Peterson algorithm.md", "Concurrent Systems/notes/2 - Fast mutex by Lamport.md", "Concurrent Systems/notes/3a - Hardware primitives & Lamport Bakery algorithm.md", - "Concurrent Systems/notes/3b - Aravind's algorithm and improvements.md", - "Concurrent Systems/notes/1b - Peterson algorithm.md", "Concurrent Systems/notes/7- MUTEX-free concurrency.md", "Concurrent Systems/notes/9 - Consensus.md", "Concurrent Systems/notes/10 - Implementing Consensus.md", @@ -218,13 +222,10 @@ "Pasted image 20250401092557.png", "Pasted image 20250401083747.png", "Concurrent Systems/notes/2b - Round Robin algorithm.md", - "Concurrent Systems/notes/4c - Dining Philosophers.md", "Concurrent Systems/notes/6a - Alternatives to Atomicity.md", "Concurrent Systems/notes/6 - Atomicity.md", - "Concurrent Systems/notes/5 - Software Transactional Memory.md", "Concurrent Systems/notes/8 - Enhancing Liveness Properties.md", "Concurrent Systems/slides/class 9.pdf", - "Concurrent Systems/notes/4 - Semaphores.md", "Concurrent Systems/slides/class 6.pdf", "Concurrent Systems/slides/class 5.pdf", "Concurrent Systems/notes/images/Pasted image 20250325090735.png", diff --git a/Concurrent Systems/notes/3a - Hardware primitives & Lamport Bakery algorithm.md b/Concurrent Systems/notes/3a - Hardware primitives & Lamport Bakery algorithm.md index e9f8b01..5e554f0 100644 --- a/Concurrent Systems/notes/3a - Hardware primitives & Lamport Bakery algorithm.md +++ b/Concurrent Systems/notes/3a - Hardware primitives & Lamport Bakery algorithm.md @@ -150,9 +150,9 @@ lock(i) := FLAG[i] <- up max_turn <- max{MY_TURN[1],...,MY_TURN[n]} if max_turn > 2n then - MY_TURN[i] = max_turn - 2n + 1 + MY_TURN[i] = 1 else - MY_TURN[i] = max_turn + 1 | secondo me basta già così + MY_TURN[i] = max_turn + 1 FLAG[i] <- down