What Does Dining Philosophers Problem Mean?
The dining philosophers problem is a classic example in computer science often used to illustrate synchronization issues and solutions in concurrent algorithm design. It illustrates the challenges of avoiding a system state where progress is not possible, a deadlock. The problem was created in 1965 by E. W. Dijkstra. Presented as a student exam exercise, the problem illustrates a number of computers competing for access to tape drive peripherals. The formulation known today was a later revision by Tony Hoare.
Techopedia Explains Dining Philosophers Problem
The dining philosophers problem is an illustration of a deadlock, a state in which multiple processes are waiting for a single resource currently being used by another process, and the solutions to these types of problems. The present formulation of the problem with the philosophers was created by Tony Hoare, but the problem was originally formulated by Edsger Dijkstra in 1965.
Tony Hoare’s problem statement is about five philosophers who must alternatively eat and think. All five are sited in a round table with a plate of spaghetti and forks adjacently placed between philosophers. A fork can only be used by one philosopher at a time. However in order to eat, two forks are required – fork in one’s left and right. A philosopher can take an available fork but is not allowed to eat unless the philosopher has both his left and right forks. It should be noted that eating is not limited by the possible amount of spaghetti left or stomach space. It is assumed that there is an infinite supply of spaghetti and demand.