A solution to the Dining Philosophers Problem which avoids deadlock is
1996
A solution to the Dining Philosophers Problem which avoids deadlock is
- A.
ensure that all philosophers pick up the left fork before the right fork
- B.
ensure that all philosophers pick up the right fork before the left fork
- C.
ensure that one particular philosopher picks up the left fork before the right fork, and that all other philosophers pick up the right fork before the left fork
- D.
none of these
Attempted by 91 students.
Show answer & explanation
Correct answer: C
Deadlock arises from circular wait when all philosophers pick up the left fork first. Avoiding this requires breaking symmetry in resource acquisition order. Option 2 achieves this by altering the sequence for one philosopher, preventing the circular dependency.
A video solution is available for this question — log in and enroll to watch it.