Skip to main content
Log in

A class of deadlock-free Maekawa-type algorithms for mutual exclusion in distributed systems

  • Published:
Distributed Computing Aims and scope Submit manuscript

Abstract

Maekawa-type mutual exclusion algorithms use locking of a set of sites to achieve mutual exclusion. These algorithms are prone to deadlocks because a site is locked by other sites in exclusive mode and the timestamp of requests is not used to order requests while granting locks. These algorithms require additional rounds of message exchanges, like INQUIRE and FAILED, to recover from a possible deadlock. In this paper we present a class of Maekawa-type mutual exclusion algorithms which are free from deadlocks and do not exchange additional messages to resolve deadlocks. We systematically point out the reasons for deadlocks in Maekawa-type algorithms and eliminate them one by one to give a class of Maekawa-type algorithms which are free from deadlocks. It turns out that to prevent deadlocks in Maekawa-type algorithms, locks on sites must be mutable, timestamps must be used judiciously, and communication among sites must be increased. A deadlock-free Maekawa-type algorithm is optimal when the request sets of sites are the smallest possible such that a correctness condition is satisfied. We state the condition of optimality and present a method to construct optimal request sets. We also give a swap operation which allows us to derive an optimal configuration of request sets from another optimal configuration. There are large number of optimal configurations of request sets, which define a class of optimal deadlock-free Maekawa-type algorithms. Freedom from deadlocks is a desirable property because it dispenses with the need of cumbersome deadlock recovery scheme (e.g., exchange of INQUIRE, FAILED, and YIELD messages). Freedom from deadlock has another benefit: simplicity of the implementation.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Agrawal D, Abbadi Amr E: An efficient solution to the distributed mutual exclusion problem. ACM Symposium on the Principles of Distributed Computing (PODC'89) 1989, pp. 193–200

  2. Albert AA, Sandler R: An introduction to finite projective planes. Holt, Rinehart, and Winston, New York 1968

    Google Scholar 

  3. Buckley G, Silberschatz A: A failure tolerant centralized mutual exclusion algorithm. Proc of the 4th Int Conf on Distributed Computing Systems, pp 347–356 (May 1984)

  4. Lamport L: Time, clocks and ordering of events in distributed systems. Commun ACM, pp 558–565 (July 1978)

  5. Maekawa M: A\(\sqrt N\) Algorithm for mutual exclusion in decentralized systems. ACM Trans Comput Syst, pp 145–159 (May 1985)

  6. Mullender SP, Vitanyi PMB: Distributed match-making. Algorithmica (Special issue on parallel and distributed computing) 3(3):367–391 (1988)

    Google Scholar 

  7. Naimi M, Trehel M: An improvement of the Log(n) distributed algorithm for mutual exclusion. In: Proc of the 7th Int Conf on Distributed Computing Systems, W. Berlin, FRG, pp 371–375 (September 23–25, 1987)

  8. Nishio S, Li KF, Manning EG: A Resileint mutual exclusion algorithm for computer networks. IEEE Trans on Parallel and Distributed Systems, pp 344–355 (July 1990)

  9. Raymond K: A tree-based algorithm for distributed mutual exclusion. ACM Trans Comput Syst 7(1) pp 61–77 (February 1989)

    Google Scholar 

  10. Ricart G, Agrawala AK: An optimal algorithm for mutual exclusion in computer networks. Communications of ACM, pp 9–17 (January 1981)

  11. Sanders B: The information structure of distributed mutual exclusion algorithms. ACM Trans Comput Syst, pp 284–299 (August 1987)

  12. Singhal M: A dynamic information structure mutual exclusion algorithm for distributed systems, revised version (submitted to IEEE TPDS; also in the Proc of 9th ICDCS, June 1989)

  13. Singhal M: A heuristically-aided algorithm for mutual exclusion in distributed systems. IEEE Trans Comput 38 (5):651–662 (May 1989)

    Google Scholar 

  14. Suzuki I, Kasami T: A distributed mutual exclusion algorithm. ACM Trans Comput Syst, pp 344–349 (November 1985)

  15. Van-De-Snepscheut JLA: Fair mutual exclusion on a graph of processes. Distrib Comput 2(2):113–115 (August 1987)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Additional information

Mukesh Singhal was born in India on May 8, 1959. He received Bachelor of Engineering degree in Electronics and Communication Engineering with high distinction from University of Roorkee, Roorkee, India, in 1980. He jointed the Department of Computer Science, University of Maryland, College Park, in January 1981, where he obtained Ph.D. degree in May 1986 for his work in the design and analysis of concurrency control algorithms in distributed database systems. Since February 1986, he has been a faculty of Computer & Information Science at the Ohio State University, Columbus. From 1981 to 1985, he served as a Teaching/Research Assistant and Instructor at the Department of Computer Science, University of Maryland, College Park. His current research interests include distributed systems, distributed databases, and performance modeling.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Singhal, M. A class of deadlock-free Maekawa-type algorithms for mutual exclusion in distributed systems. Distrib Comput 4, 131–138 (1991). https://doi.org/10.1007/BF01798960

Download citation

  • Received:

  • Accepted:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01798960

Key words

Navigation