vault backup: 2025-04-06 16:58:00

This commit is contained in:
Marco Realacci 2025-04-06 16:58:00 +02:00
parent 6e87cd5b03
commit 09d45ed1c5
2 changed files with 4 additions and 5 deletions

View file

@ -13,12 +13,12 @@
"state": { "state": {
"type": "markdown", "type": "markdown",
"state": { "state": {
"file": "Concurrent Systems/notes/4 - Semaphores.md", "file": "Concurrent Systems/notes/4b - Monitors.md",
"mode": "source", "mode": "source",
"source": false "source": false
}, },
"icon": "lucide-file", "icon": "lucide-file",
"title": "4 - Semaphores" "title": "4b - Monitors"
} }
} }
] ]
@ -191,13 +191,13 @@
}, },
"active": "6550032d28b9171c", "active": "6550032d28b9171c",
"lastOpenFiles": [ "lastOpenFiles": [
"Concurrent Systems/notes/4 - Semaphores.md",
"Concurrent Systems/notes/3b - Aravind's algorithm and improvements.md", "Concurrent Systems/notes/3b - Aravind's algorithm and improvements.md",
"Concurrent Systems/notes/10 - Implementing Consensus.md", "Concurrent Systems/notes/10 - Implementing Consensus.md",
"Concurrent Systems/notes/1b - Peterson algorithm.md", "Concurrent Systems/notes/1b - Peterson algorithm.md",
"Concurrent Systems/slides/class 5.pdf", "Concurrent Systems/slides/class 5.pdf",
"Concurrent Systems/notes/5 - Software Transactional Memory.md", "Concurrent Systems/notes/5 - Software Transactional Memory.md",
"Concurrent Systems/notes/4c - Dining Philosophers.md", "Concurrent Systems/notes/4c - Dining Philosophers.md",
"Concurrent Systems/notes/4 - Semaphores.md",
"\u0002.md", "\u0002.md",
"Concurrent Systems/notes/2b - Round Robin algorithm.md", "Concurrent Systems/notes/2b - Round Robin algorithm.md",
"\u0001.md", "\u0001.md",

View file

@ -300,4 +300,3 @@ def end_write() :=
return return
``` ```
This is prioritizing writers as if there are writers waiting, they will be waiting at `GLOB_MUTEX.down()`. This semaphore is upped before `PRIO_MUTEX` which is the one that blocks readers. This is prioritizing writers as if there are writers waiting, they will be waiting at `GLOB_MUTEX.down()`. This semaphore is upped before `PRIO_MUTEX` which is the one that blocks readers.
But writers won't be able to writer until there are no readers, if they keep coming, they will block the writers as `GLOB_MUTEX` will never be upped.