Add the rest of university notes
This commit is contained in:
366 files changed
+9844
-110
No files matched your search
@@ -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**.
|
||||
|
||||

|
||||

|
||||
|
||||
#### Code for Solution 3
|
||||
|
||||
|
||||
Reference in new issue
Block a user