vault backup: 2025-03-27 15:23:43
This commit is contained in:
parent
06131ce1f0
commit
41b6b7d051
2 changed files with 61 additions and 55 deletions
|
@ -20,7 +20,7 @@ Philosopher(i) :=
|
|||
chopstick[(i+1)%N].up()
|
||||
chopstick[i].up()
|
||||
```
|
||||
No two neighbors can eat simultaneously, but we can have a deadlock if all philosophers grab their right chopstick simultaneously.
|
||||
No two neighbours can eat simultaneously, but we can have a deadlock if all philosophers grab their right chopstick simultaneously.
|
||||
|
||||
#### Solution 1
|
||||
Give a number to all forks and always try with the smaller.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue