Skip to content

The Dining Philosophers problem, proposed by Dijkstra in 1965, serves as a synchronization challenge. Since then, numerous synchronization algorithms have been either related to or tested against the Dining Philosophers problem.

Notifications You must be signed in to change notification settings

Codee-Hub/java-the-dining-philosophers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Dining Philosophers

The Dining Philosophers problem, proposed by Dijkstra in 1965, serves as a synchronization challenge. Since then, numerous synchronization algorithms have been either related to or tested against the Dining Philosophers problem.

Problem Definition

It's important to note that this is merely an analogy. In this scenario, each philosopher alternates between two tasks: eating and thinking. When a philosopher becomes hungry, they attempt to pick up the forks to their left and right, one at a time, regardless of order. If successful in acquiring both forks, they eat for a certain period and then return the forks to the table, thereafter resuming thinking.

By definition, the problem at hand is:

Are you able to propose an algorithm that implements each philosopher in such a way that they can execute the tasks of eating and thinking without ever becoming deadlocked?

Feel free to add more details or explanations as needed!

About

The Dining Philosophers problem, proposed by Dijkstra in 1965, serves as a synchronization challenge. Since then, numerous synchronization algorithms have been either related to or tested against the Dining Philosophers problem.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages