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 ScholarDigital Library
- [3] Hoare, C.A.R. Communicating Sequential Processes, Prentice-Hall Inc., Englewood Cliffs, New Jersey, 1985. Google ScholarDigital 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 ScholarDigital Library
- [6] Tanenbaum, A.S. Operating Systems: Design and Implementation, Prentice-Hall Inc., Englewood Cliffs, New Jersey, 1987. Google ScholarDigital 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 ScholarDigital 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 ...
Generalised Dining Philosophers as Feedback Control
Distributed Computing and Internet TechnologyAbstractWe examine the mutual exclusion problem of concurrency through the systematic application of modern feedback control theory, by revisiting the classical problem involving mutual exclusion: the Generalised Dining Philosophers problem. The result is ...
Comments