Abstract
This paper describes a problem in the solution of the dining philosophers problem by Gingras [2] that makes it inefficient, instead of the claimed maximal efficiency. A correct implementation is presented. Even then, the solution has other undesirable characteristics and is still not maximally efficiency. Depending on the definition of efficiency, it may not be possible to attain maximal efficiency and be starvation-free at the same time. A better and simpler solution for general mutual exclusion problems, in which the dining philosophers problem is a special case, is presented. This solution can become symmetric if appropriate data structures are used.
- [1] Dijkstra, E.W. Cooperating Sequential Processes, in Programming Languages, Genuys, F. Ed., Academic Press, New York, 1968.Google Scholar
- [2] Gingras, A.R., Dining Philosophers Revisited. SIGCSE Bulletin, vol. 22 No. 3 (1990), 21-28. Google Scholar
Digital Library
- [3] Hoare, C.A.R. Communicating Sequential Processes, Prentice-Hall Inc., Englewood Cliffs, New Jersey, 1985. Google Scholar
Digital Library
- [4] Holt, R.C., Concurrent Euclid, The UNIX System, and TUNIS, Addison-Wesley, Reading, Massachusetts, 1983.Google Scholar
- [5] Page, I.P. & Jacob, R.T., The Solution of Mutual Exclusion Problems which can be Described Graphically, The Computer Journal, vol. 32 No. 1 (1989), 45-54. Google Scholar
Digital Library
- [6] Tanenbaum, A.S. Operating Systems: Design and Implementation, Prentice-Hall Inc., Englewood Cliffs, New Jersey, 1987. Google Scholar
Digital Library
- Yue K. & Jacob R.T., Starvation-Free Semaphore Solutions to Mutual Exclusion Problems, Proceedings of the 1987 ACM Southern Central Regional ACM Conference, Lafayette, Louisiana (Nov. 1987), 127-141.Google Scholar
- Yue K., Semaphore Solutions for General Mutual Exclusion Problems, PhD dissertation, University of North Texas, Denton, Texas, 1988. Google Scholar
Digital Library
Index Terms
Dining philosophers revisited, again
Recommendations
Dining philosophers revisited
In 1965 Dijkstra posed and solved the Dining Philosophers problem. Since then the problem has become a classic test case for concurrency mechnisms and an example often discussed in operating systems courses. Two theorems prove the correctness of ...
The dining philosophers problem revisited
JMLC'06: Proceedings of the 7th joint conference on Modular Programming LanguagesWe present an alternative solution to the Dining Philosophers problem that is based on Peterson’s mutual exclusion algorithm for N processes, with the benefit of not using any ingredients beyond atomic read and write operations. We proceed in two steps ...
Triple-handed dining philosophers
The dining philosophers problem was originally coined by Prof. Dijkstra, [1], to investigate synchronizing mechanisms in co-operating sequential processes. A profound interest was aroused by the dining philosophers in the subsequent period. This ...






Comments