From 962eedf000401d9a06368ea36a056b012eb12c93 Mon Sep 17 00:00:00 2001 From: Marco Realacci Date: Fri, 21 Mar 2025 18:50:08 +0100 Subject: [PATCH] vault backup: 2025-03-21 18:50:08 --- .obsidian/workspace.json | 20 ++++++++++++++++++-- Concurrent Systems/notes/4b - Monitors.md | 3 ++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 6fe1aff..e3d3e2b 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -21,6 +21,22 @@ "title": "4b - Monitors" } }, + { + "id": "cb0eda06ef87cab2", + "type": "leaf", + "state": { + "type": "pdf", + "state": { + "file": "Concurrent Systems/slides/class 4.pdf", + "page": 14, + "left": -227, + "top": 577, + "zoom": 0.9 + }, + "icon": "lucide-file-text", + "title": "class 4" + } + }, { "id": "16a4a3f7d00f9524", "type": "leaf", @@ -225,8 +241,9 @@ }, "active": "51157f32453cba69", "lastOpenFiles": [ - "Concurrent Systems/notes/4 - Semaphores.md", + "Concurrent Systems/slides/class 4.pdf", "Concurrent Systems/notes/4b - Monitors.md", + "Concurrent Systems/notes/4 - Semaphores.md", "Concurrent Systems/notes/5 - Software Transactional Memory.md", "Concurrent Systems/notes/2b - Round Robin algorithm.md", "Concurrent Systems/notes/4c - Dining Philosophers.md", @@ -247,7 +264,6 @@ "Pasted image 20250318090733.png", "Concurrent Systems/slides/class 5.pdf", "Concurrent Systems/notes/images/Pasted image 20250317105355.png", - "Concurrent Systems/slides/class 4.pdf", "Concurrent Systems/notes/images/Pasted image 20250317100456.png", "HCIW/slides/4 HUI2016-6-forcefeedback.pdf", "HCIW/slides/3b Haptic slides.pdf", diff --git a/Concurrent Systems/notes/4b - Monitors.md b/Concurrent Systems/notes/4b - Monitors.md index a5362e1..bd145ed 100644 --- a/Concurrent Systems/notes/4b - Monitors.md +++ b/Concurrent Systems/notes/4b - Monitors.md @@ -34,7 +34,8 @@ Of course, `signal()` will have no effect on the last process who calls it. - For every condition C, a semaphore SEMC init at 0 and an integer $N_{C}$ init at 0 (to store and count the number of suspended processes on the given condition) - A semaphore PRIO init at 0 and an integer $N_{PR}$ init at 0 (to store and count the number of processes that have performed a signal, and so have priority to re-enter the monitor) -Every monitor operation starts with `MUTEX.down()` and ends with `if NPR > 0 then PRIO.up() else MUTEX.up()` +>[!note]Operations +>Every monitor operation starts with `MUTEX.down()` and ends with `if NPR > 0 then PRIO.up() else MUTEX.up()` ``` C.wait() :=