Philosophers who spend their lives just thinking and feasting



The dining philosophers problem was invented by E. W. Dijkstra, a concurrency pioneer, to clarify the notions of deadlock and starvation freedom. Imagine five philosophers who spend their lives just thinking and feasting. They sit around a circular table with five chairs. The table has a big plate of rice. However, there are only five chopsticks (in the original formulation forks) available, as shown in the figure below. Each philosopher thinks. When he gets hungry, he sits down and picks up the two chopsticks/forks that are closest to him. If a philosopher can pick up both chopsticks, he can eat for a random amount of time. After a philosopher finishes eating, he puts down the chopsticks and again starts to think.

Related Questions in philosophy category

The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.