From 6492d433d2611d5a3d3a3ce4c1b21a613d7fe338 Mon Sep 17 00:00:00 2001 From: Marco Realacci Date: Wed, 2 Apr 2025 23:25:03 +0200 Subject: [PATCH] vault backup: 2025-04-02 23:25:03 --- Concurrent Systems/test/Untitled.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Concurrent Systems/test/Untitled.md b/Concurrent Systems/test/Untitled.md index d28100e..b0aef03 100644 --- a/Concurrent Systems/test/Untitled.md +++ b/Concurrent Systems/test/Untitled.md @@ -3,10 +3,12 @@ GLOB_MUTEX and R_MUTEX semaphores init. at 1 R a shared register init. at 0 begin_read() := + PRIO_MUTEX.down() R_MUTEX.down() R++ # currently active readers if R = 1 then GLOB_MUTEX.down() R_MUTEX.up() + PRIO_MUTEX.up() return end_read() :=