Dining Philosophers Problem (Deadlock Avoidance)
Revision as of 10:26, 15 February 2023 by Admin (talk | contribs) (Created page with "{{DISPLAYTITLE:Dining Philosophers Problem (Deadlock Avoidance)}} == Description == There are $n$ philosophers numbered 0 through $n-1$, seated around a circle table. Their only problem--besides philosophy--is that the dish served is a very difficult kind of spaghetti, that has to be eaten with two forks. There are two forks next to each plate, so that presents no difficulty: as a consequence, however, no two neighbors may be eating simultaneously. The philosophers' li...")
Description
There are $n$ philosophers numbered 0 through $n-1$, seated around a circle table. Their only problem--besides philosophy--is that the dish served is a very difficult kind of spaghetti, that has to be eaten with two forks. There are two forks next to each plate, so that presents no difficulty: as a consequence, however, no two neighbors may be eating simultaneously. The philosophers' lives consist of an alternation between eating and thinking. The goal is to devise a strategy such that no philosopher is stuck thinking forever and each philosopher may eat at reasonable intervals.
Related Problems
Generalizations: Deadlock Avoidance
Parameters
n: number of philosophers
Table of Algorithms
Name | Year | Time | Space | Approximation Factor | Model | Reference |
---|---|---|---|---|---|---|
Resource hierarchy solution | 1965 | $O({2}^n)$ | $O(n)$ | Exact | Deterministic | Time |
Arbitrator solution | 1965 | $O({2}^n)$ | $O({1})$ | Exact | Deterministic | Time |