Add the rest of university notes

This commit is contained in:
John Gatward committed 2026-10-04 14:02:35 +01:00
1 parent c1b84c7f7d
commit d0f27f276b
366 files changed
+9844 -110

No files matched your search

+2 -2
View File
@@ -2,7 +2,7 @@
## The Dining Philosophers Problem
<img src="/lectures/osc/assets/w.png" alt="img" style="zoom:67%;" />
<img src="assets/w.png" alt="img" style="zoom:67%;" />
The problem is defined as:
@@ -50,7 +50,7 @@ The solution uses:
> * `sync` : one **semaphore/mutex** to enforce **mutual exclusion** of the critical section (while updating the **states** of `hungry` `thinking` and `eating`)
> * A philosopher can only **start eating** if their neighbours are **not eating**.
![img](/lectures/osc/assets/x.png)
![img](assets/X.png)
#### Code for Solution 3