Skip to content

The Dining Philosophers problem: Five philosophers, alternating between thinking and eating, sharing forks without deadlocks.

Notifications You must be signed in to change notification settings

UchihaShaco/philosophers

Repository files navigation

Dining Philosophers Problem

The Dining Philosophers problem is a classic synchronization problem in computer science that was introduced by Edsger Dijkstra in 1965. It demonstrates the challenges of coordinating multiple processes or threads in a concurrent system.

Problem Description

In this problem, there are five philosophers sitting at a round table.
Each philosopher alternates between thinking and eating.
A fork is placed between each pair of adjacent philosophers, and to eat, a philosopher needs to pick up both forks on their sides.

The challenge is to design a solution that prevents deadlocks and ensures that each philosopher gets a fair opportunity to eat without causing resource conflicts.

About

The Dining Philosophers problem: Five philosophers, alternating between thinking and eating, sharing forks without deadlocks.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published