Distributed Computing

, Volume 6, Issue 4, pp 233–244 | Cite as

A modular drinking philosophers algorithm

  • Jennifer L. Welch
  • Nancy A. Lynch
Article

Summary

A variant of the drinking philosophers algorithm of Chandy and Misra is described and proved correct in a modular way. The algorithm of Chandy and Misra is based on a particular dining philosophers algorithm and relies on certain properties of its implementation. The drinking philosophers algorithm presented in this paper is able to use an arbitrary dining philosophers algorithm as a subroutine; nothing about the implementation needs to be known, only that it solves the dining philosophers problem. An important advantage of this modularity is that by substituting a more time-efficient dining philosophers algorithm than the one used by Chandy and Misra, a drinking philosophers algorithm withO(1) worst-case waiting time is obtained, whereas the drinking philosophers algorithm of Chandy and Misra hasO(n) worst-case waiting time (forn philosophers). Careful definitions are given to distinguish the drinking and dining philosophers problems and to specify varying degrees of concurrency.

Key words

Dining philosophers Distributed algorithms Drinking philosophers Modularity Resource allocation 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Awerbuch B, Saks M: A dining philosophers algorithm with polynomial response time. Proc 31st IEEE Symposium on Foundations of Computer Science, pp 65–74 (1990)Google Scholar
  2. 2.
    Chandy KM, Misra J: The drinking philosophers problem. ACM Trans Program Lang Syst 6 (4):632–646 (1984)Google Scholar
  3. 3.
    Choy M, Singh AK: Efficient fault-tolerant algorithms for resource allocation in distributed systems. Proc 24th ACM Symp Theo Comput, pp 593–602 (1992)Google Scholar
  4. 4.
    Dijkstra EW: Hierarchical ordering of sequential processes. Acta Inf 1 (2):115–138 (1971)Google Scholar
  5. 5.
    Ginat D, Shankar AU, Agrawala AK: An efficient solution to the drinking philosophers problem and its extensions. Proc 3rd International Workshop on Distributed Algorithms. Lect Comput Sci, vol 392. Springer, Berlin Heidelberg New York 1989, pp 83–93Google Scholar
  6. 6.
    Lehmann D, Rabin M: On the advantages of free choice: a symmetric and fully distributed solution to the dining philosophers problem. Proc 8th ACM Symposium on Principles of Programming Languages, pp 133–138 (1981)Google Scholar
  7. 7.
    Lynch NA: Upper bounds for static resource allocation in a distributed system. J Comput Syst Sci 23 (2):254–278 (1981)Google Scholar
  8. 8.
    Lynch NA, Tuttle MR: Hierarchical correctness proofs for distributed algorithms. Proc 6th ACM Symposium on Principles of Distributed Computing, pp 137–151 (1987). (Also available as Technical Report MIT/LCS/TR-387. Laboratory for Computer Science, Massachusetts Institute of Technology, April 1987.)Google Scholar
  9. 9.
    Murphy SL, Shankar AU: A note on the drinking philosophers problem. ACM Trans Program Lang Syst 10(1):178–188 (1988)Google Scholar
  10. 10.
    Peterson GL, Fischer MJ: Economical solutions for the critical section problem in a distributed system. Proc 9th ACM Symposium on Theory of Computing, pp 91–97 (1977)Google Scholar
  11. 11.
    Singh AK: Ranking in distributed systems. Ph.D. dissertation. Department of Computer Sciences, University of Texas at Austin, 1989Google Scholar
  12. 12.
    Singh AK, Gouda MG: Rankers: a classification of synchronization problems. manuscriptGoogle Scholar
  13. 13.
    Welch JL: Topics in distributed computing: the impact of partial synchrony, and modular decomposition of algorithms. Ph.D. thesis. Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, 1988Google Scholar
  14. 14.
    Welch JL, Lynch NA: Synthesis of efficient drinking philosophers algorithms. Technical Memorandum MIT/LCS/TM-417. Laboratory for Computer Science, Massachusetts Institute of Technology, 1989Google Scholar

Copyright information

© Springer-Verlag 1993

Authors and Affiliations

  • Jennifer L. Welch
    • 1
  • Nancy A. Lynch
    • 2
  1. 1.Department of Computer ScienceTexas A&M UniversityCollege StationUSA
  2. 2.Laboratory for Computer ScienceMITCambridgeUSA

Personalised recommendations