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() :=