The problem is how to design a regimen (a concurrent algorithm) such that no philosopher will starve i.e., each can forever continue to alternate between eating and thinking, assuming that no philosopher can know when others may want to eat or think (an issue of incomplete information). After an individual philosopher finishes eating, he will put down both forks. Thus two forks will only be available when his two nearest neighbors are thinking, not eating. Moreover, a philosopher can only eat his spaghetti when he has both a left and right fork. Each philosopher can only alternately think and eat. The dish served is a kind of spaghetti which has to be eaten with two forks. Each philosopher has his own plate at the table. Problem statement įive philosophers dine together at the same table. Soon after, Tony Hoare gave the problem its present form. It was originally formulated in 1965 by Edsger Dijkstra as a student exam exercise, presented in terms of computers competing for access to tape drive peripherals. In computer science, the dining philosophers problem is an example problem often used in concurrent algorithm design to illustrate synchronization issues and techniques for resolving them. Problem used to illustrate synchronization issues and techniques for resolving them Illustration of the dining philosophers problem
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |