vault backup: 2025-03-17 09:49:23

This commit is contained in:
Marco Realacci 2025-03-17 09:49:23 +01:00
parent 4f9620a1f5
commit cd407da403
2 changed files with 17 additions and 3 deletions

View file

@ -34,9 +34,9 @@
"type": "pdf", "type": "pdf",
"state": { "state": {
"file": "Concurrent Systems/slides/class 4.pdf", "file": "Concurrent Systems/slides/class 4.pdf",
"page": 13, "page": 14,
"left": -27, "left": -27,
"top": 96, "top": 94,
"zoom": 0.5754156769596199 "zoom": 0.5754156769596199
}, },
"icon": "lucide-file-text", "icon": "lucide-file-text",

View file

@ -55,4 +55,18 @@ C.signal() :=
PRIO.down() PRIO.down()
NPR-- NPR--
``` ```
p.s. The wait **always** suspends, even if there is only a process. p.s. The wait **always** suspends, even if there is only a process.
#### Readers/Writers problem, strong priority to Readers
```
monitor RW_READERS :=
AR, WR, AW, WW init at 0
condition CR, CW
operation begin_read() :=
WR++
if AW != 0 then
CR.wait()
CR.signal()
```