Dining Philosophers Problem (Deadlock Avoidance)
Jump to navigation
Jump to search
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 |