Skip to content

urumican/Dinner-of-philos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Dinner-of-philos

Concurrency2

The Dining Philosophers Problem was proposed by Dijkstra in 1965, when dinosaurs ruled the earth. It appears in a number of variations, but the standard features are a table with five plates, five forks (or chopsticks), and a big bowl of spaghetti. Five philosophers, who represent interacting threads, come to the table and execute the following loop: think(), get_forks(), eat(), put_forks() Assuming that the philosophers know how to think() and eat(), write a solution to this problem There are several synchronization constraints that we need to enforce to make this system work correctly: A single fork can only be held by a single philosopher It must be impossible for deadlock to occur Starvation is disallowed More than a single philosopher must be capable of eating simultaneously All must be alive at program termination.

About

Concurrency2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages