From 09d45ed1c5a9a13cd5664dee40bfd28c60fddf90 Mon Sep 17 00:00:00 2001 From: Marco Realacci Date: Sun, 6 Apr 2025 16:58:00 +0200 Subject: [PATCH] vault backup: 2025-04-06 16:58:00 --- .obsidian/workspace.json | 6 +++--- Concurrent Systems/notes/4 - Semaphores.md | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 5180f88..5213ac6 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -13,12 +13,12 @@ "state": { "type": "markdown", "state": { - "file": "Concurrent Systems/notes/4 - Semaphores.md", + "file": "Concurrent Systems/notes/4b - Monitors.md", "mode": "source", "source": false }, "icon": "lucide-file", - "title": "4 - Semaphores" + "title": "4b - Monitors" } } ] @@ -191,13 +191,13 @@ }, "active": "6550032d28b9171c", "lastOpenFiles": [ + "Concurrent Systems/notes/4 - Semaphores.md", "Concurrent Systems/notes/3b - Aravind's algorithm and improvements.md", "Concurrent Systems/notes/10 - Implementing Consensus.md", "Concurrent Systems/notes/1b - Peterson algorithm.md", "Concurrent Systems/slides/class 5.pdf", "Concurrent Systems/notes/5 - Software Transactional Memory.md", "Concurrent Systems/notes/4c - Dining Philosophers.md", - "Concurrent Systems/notes/4 - Semaphores.md", "\u0002.md", "Concurrent Systems/notes/2b - Round Robin algorithm.md", "\u0001.md", diff --git a/Concurrent Systems/notes/4 - Semaphores.md b/Concurrent Systems/notes/4 - Semaphores.md index ba1dad2..ef5bb33 100644 --- a/Concurrent Systems/notes/4 - Semaphores.md +++ b/Concurrent Systems/notes/4 - Semaphores.md @@ -299,5 +299,4 @@ def end_write() := W_MUTEX.up() return ``` -This is prioritizing writers as if there are writers waiting, they will be waiting at `GLOB_MUTEX.down()`. This semaphore is upped before `PRIO_MUTEX` which is the one that blocks readers. -But writers won't be able to writer until there are no readers, if they keep coming, they will block the writers as `GLOB_MUTEX` will never be upped. \ No newline at end of file +This is prioritizing writers as if there are writers waiting, they will be waiting at `GLOB_MUTEX.down()`. This semaphore is upped before `PRIO_MUTEX` which is the one that blocks readers. \ No newline at end of file