An algorithm with optimal failure locality for the dining philosophers problem

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 857)


This paper presents an algorithm for the dining philosophers problem with a failure locality of two, i.e. in the presence of undetectable fail-stop failures, the algorithm guarantees that a process is free from starvation if no processes that are within two hops away from the process fail. It can be shown that any non-probabilistic algorithm for the problem has a failure locality of at least two; hence, the failure locality of our algorithm is optimal. Our algorithm combines the idea of a dynamic priority scheme with the use of a preemptive fork collecting strategy. Its response time is O(n), where n is the total number of processes, if no failures actually occur or O(n2) in the presence of failures. As an application, we show how the algorithm can be used to derive a scheduling algorithm for the synchronization of CSP-like processes that is strongly fair and has a failure locality of three.


Fault-Tolerance Lower Bounds Resource Allocation Strong Fairness Synchronization 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    B. Awerbuch and M. Saks. A dining philosophers algorithm with polynomial response time. In Proceedings of the 31st IEEE Conference on Foundations of Computer Science, pages 65–74, 1990.Google Scholar
  2. 2.
    R.L. Bagrodia. Process synchronization: Design and performance evaluation of distributed algorithms. IEEE Transactions on Software Engineering, 15(9):1053–1065, September 1989.CrossRefGoogle Scholar
  3. 3.
    R.L. Bagrodia. Synchronization of asynchronous processes in CSP. ACM TOPLAS, 11(4):585–597, October 1989.CrossRefGoogle Scholar
  4. 4.
    G. Buckley and A. Silberschatz. An effective implementation of the generalized input-output construct of CSP. ACM TOPLAS, 5(2):223–235, April 1983.CrossRefGoogle Scholar
  5. 5.
    K.M. Chandy and J. Misra. The drinking philosophers problem. ACM TOPLAS, 6(4):632–646, October 1984.CrossRefGoogle Scholar
  6. 6.
    K.M. Chandy and J. Misra. Parallel Program Design: A Foundation. Addison-Wesley, 1988.Google Scholar
  7. 7.
    M. Choy and A.K. Singh. Efficient fault tolerant algorithms for resource allocation in distributed systems. In Proceedings of the 24th ACM Symposium on Theory of Computing, 1992.Google Scholar
  8. 8.
    M. Choy and A.K. Singh. Tight lower bounds on failure locality of distributed synchronization. In Proceedings of the 30th Annual Allerton Conference on Communication, Control, and Computing, pages 127–136, 1992.Google Scholar
  9. 9.
    M. Choy and A.K. Singh. Private communication, 1994.Google Scholar
  10. 10.
    E.W. Dijkstra. Two starvation free solutions of a general exclusion problem, 1978. EWD 625, Plataanstraat 5, 5671 AL Nuenen, Netherlands.Google Scholar
  11. 11.
    D. Dolev, C. Dwork, and L. Stockmeyer. On the minimal synchronism needed for distributed consensus. Journal of the ACM, 34(1):77–97, January 1987.CrossRefGoogle Scholar
  12. 12.
    M.J. Fischer, N. Lynch, and M. Paterson. Impossibility of distributed consensus with one faulty process. Journal of the ACM, 32(2):374–382, April 1985.CrossRefGoogle Scholar
  13. 13.
    D. Lehmann and M.O. Rabin. On the advantage of free choice: A symmetric and fully distributed solution to the dining philosophers problem. In Proceedings of the 8th ACM Symposium on Principles of Programming Languages, 1981.Google Scholar
  14. 14.
    N.A. Lynch. Fast allocation of nearby resources in a distributed system. In Proceedings of the 12th ACM Symposium on Theory of Computing, 1980.Google Scholar
  15. 15.
    M. Naor and L. Stockmeyer. What can be computed locally. In Proceedings of the 25th ACM Symposium on Theory of Computing, 1993.Google Scholar
  16. 16.
    S. Ramesh. A new implementation of CSP with output guards. In Proceedings of the 7th International Conference on Distributed Computing Systems, pages 266–273, 1987.Google Scholar
  17. 17.
    F.B. Schneider. Synchronization in distributed programs. ACM TOPLAS, 4(2):125–148, April 1982.CrossRefGoogle Scholar
  18. 18.
    A.P. Sistla. Distributed algorithms for ensuring fair interprocess communication. In Proceedings of the 3rd ACM Symposium on Principles of Distributed Computing, pages 266–277, 1984.Google Scholar
  19. 19.
    E. Styer and G.L. Peterson. Improved algorithms for distributed resource allocation. In Proceedings of the 7th ACM Symposium on Principles of Distributed Computing, pages 105–116, 1988.Google Scholar
  20. 20.
    Y.-K. Tsay. Distributed Coordination of Process Interactions — Fairness and Fault-Tolerance. PhD thesis, UCLA, September 1993. Also available as technical report CSD-930034.Google Scholar
  21. 21.
    Y.-K. Tsay and R.L. Bagrodia. Fault-tolerant algorithms for fair interprocess synchronization. IEEE Transactions on Parallel and Distributed Systems, 5(6), June 1994.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1994

Authors and Affiliations

  1. 1.Department of Computer SystemsUppsala UniversitySweden
  2. 2.Computer Science DepartmentUniversity of CaliforniaLos AngelesUSA

Personalised recommendations