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

Computer Science20–30 minFoundation

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.