What information entered the process?
Labs / Computer Science
Dining Philosophers
Five philosophers sit around a table, endlessly alternating between thinking and eating, but each one needs both neighbouring forks to eat. Start with the naive strategy and watch the table freeze when everyone grabs their left fork at once, then switch strategies to see how computer scientists dodge that trap. Tap any stuck philosopher to make them drop their forks and break the jam.
Labs / Computer Science / Dining Philosophers
Dining Philosophers
Five philosophers sit around a table, endlessly alternating between thinking and eating, but each one needs both neighbouring forks to eat. Start with the naive strategy and watch the table freeze when everyone grabs their left fork at once, then switch strategies to see how computer scientists dodge that trap. Tap any stuck philosopher to make them drop their forks and break the jam.
Why it matters
Why explore this?
Computer science turns clear rules into reliable processes. This model lets you step through those rules and see how each decision changes the result.
Explore
Try the model
Investigate
Questions to test
Predict first, try it in the model, then use what you observe to answer.
What to try
- With the naive strategy, what makes the whole table stop at once — and why can no one ever recover on their own?
- Once it deadlocks, tap a single philosopher. Why does freeing just one seat get everyone eating again?
- Switch to resource ordering. Which philosopher now reaches for a different fork first, and how does that one change break the cycle?
- The arbitrating waiter never deadlocks — but does the whole table ever eat at the same time? What is it trading away?
- Crank the speed up and shorten the think time. Does the naive table deadlock faster, slower, or just as unpredictably?
Explain
Make sense of what happened
Trace the process one step at a time. Name the rule used at each important step, then explain why the final result follows from those rules.
Check
Before you leave
Which rule changed it?
Why did the process produce this result?
If you can answer all three using evidence from the model, you understand the main idea. If not, return to Explore and change one setting at a time.