diff --git a/Concurrent Systems/test/Untitled.md b/Concurrent Systems/test/Untitled.md index c72aa51..2993593 100644 --- a/Concurrent Systems/test/Untitled.md +++ b/Concurrent Systems/test/Untitled.md @@ -34,36 +34,3 @@ end_write() := GLOB_MUTEX.up() return ``` - -``` -monitor RW_READERS := - AR, WR, AW, WW, R_batch init at 0 - condition CR, CW - -operation begin_read() := - WR++ - if (WW || AW != 0 then - CR.wait() - CR.signal() - AR++ - WR-- - -operation end_read() := - AR-- - if AR = 0 then - CW.signal() - -operation begin_write() := - WW++ - if (AR + AW != 0) then - CW.wait() - AW++ - WW-- - -operation end_write() := - AW-- - if WR > 0 then - CR.signal() - else - CW.signal() -``` \ No newline at end of file