← Quiz: Semaphores and Classic Problems: all 9 questions
Quiz: Semaphores and Classic Problems · Question 7 of 9
Which change makes the dining philosophers deadlock-free?
Which change makes the dining philosophers deadlock-free?
- A.Giving each philosopher a longer thinking time
- B.Letting even-numbered philosophers pick up the right fork first
- C.Adding a mutex around eating only
- D.Making every philosopher pick up the left fork first
Answer & explanation
Correct answer: Letting even-numbered philosophers pick up the right fork first
The asymmetric order breaks the circular wait.
Can you get the rest right without peeking?
Take the timed Quiz: Semaphores and Classic Problems quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →