Skip to main content
Log in

Verifying a simplification of mutual exclusion by Lycklama–Hadzilacos

  • Original Article
  • Published:
Acta Informatica Aims and scope Submit manuscript

Abstract

A simplification of the mutual exclusion algorithm of Lycklama and Hadzilacos (ACM Trans Program Lang Syst 13:558–576, 1991) is presented. It uses only four nonatomic shared bits per thread to guarantee mutual exclusion with the first-come-first-served property. The algorithm is verified by assertional methods, aided by the proof assistant PVS. A variation with five bits per thread is also given. This variation may give better performance when the number of threads is large. The use of the proof assistant made it easy to transfer the proof of the main algorithm to the variation.

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.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

References

  • Abadi, M., Lamport, L.: The existence of refinement mappings. Theor. Comput. Sci. 82, 253–284 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  • Abraham, U.: Bakery algorithms. In: Proceedings of the Concurrency, Specification, and Programming, Workshop, pp. 7–40 (1993)

  • Anderson, J.H., Gouda, M.G.: Atomic semantics of nonatomic programs. Inf. Process. Lett. 28, 99–103 (1988)

    Article  MathSciNet  MATH  Google Scholar 

  • Anderson, J.H., Kim, Y.J., Herman, T.: Shared-memory mutual exclusion: major research trends since 1986. Discret. Comput. 16, 75–110 (2003)

    Google Scholar 

  • Andrews, G.R.: Foundations of Multithreaded, Parallel, and Distributed Programming. Addison Wesley, Reading (2000)

    Google Scholar 

  • Apt, K.R., de Boer, F.S., Olderog, E.-R.: Verification of Sequential and Concurrent Programs. Springer, New York (2009)

    Book  MATH  Google Scholar 

  • Aravind, A.A., Hesselink, W.H.: A queue based mutual exclusion algorithm. Acta Inf. 46, 73–86 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  • Aravind, A.A., Hesselink, W.H.: Nonatomic dual bakery algorithm with bounded tokens. Acta Inf. 48, 67–96 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  • Ashcroft, E.: Proving assertions about parallel programs. J. Comput. Syst. Sci. 10, 110–135 (1975)

    Article  MathSciNet  MATH  Google Scholar 

  • Burns, J.E.: Complexity of Communication Among Asynchronous Parallel Processes. Ph.D. Thesis, School of Information and Computer Science, Georgia Institute of Technology (1981)

  • Clarke, E.M., Grumberg, O., Peled, D.A.: Model Checking. MIT Press, Cambridge (1999)

    Google Scholar 

  • de Roever, W.-P., de Boer, F., Hannemann, U., Hooman, J., Lakhnech, Y., Poel, M., Zwiers, J.: Concurrency Verification, Introduction to Compositional and Noncompositional Methods. Cambridge University Press, Cambridge (2001)

    MATH  Google Scholar 

  • Dijkstra, E.W.: Solution of a problem in concurrent programming control. Commun. ACM 8, 569 (1965)

    Article  Google Scholar 

  • Dijkstra, E.W.: Co-operating sequential processes. In: Genuys, F. (ed.) Programming Languages, pp. 43–112. NATO Advanced Study Institute, Academic Press, London (1968)

  • Dijkstra, E.W.: Self-stabilizing systems in spite of distributed control. Commun. ACM 17, 643–644 (1974)

    Article  MATH  Google Scholar 

  • Dijkstra, E.W.: A Discipline of Programming. Prentice Hall, Englewood Cliffs (1976)

    MATH  Google Scholar 

  • Doherty, S., Herlihy, M., Luchangco, V., Moir, M.: Bringing practical lock-free synchronization to 64-bit applications. In: Proceedings of the 23rd Annual ACM Symposium on Principles of Distributed Computing, pp. 31–39. ACM Press, New York, NY, USA (2004)

  • Gao, H., Groote, J.F., Hesselink, W.H.: Lock-free dynamic hash tables with open addressing. Distr. Comput. 17, 21–42 (2005)

    Article  Google Scholar 

  • Gao, H., Groote, J.F., Hesselink, W.H.: Lock-free parallel and concurrent garbage collection by mark &sweep. Sci. Comput. Program. 64, 341–374 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  • Gao, H., Hesselink, W.H.: A general lock-free algorithm using compare-and-swap. Inf. Comput. 205, 225–241 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  • Haldar, S., Vitanyi, P.: Bounded concurrent timestamp systems using vector clocks. J. ACM 49, 101–126 (2002)

    Article  MathSciNet  Google Scholar 

  • Herlihy, M., Shavit, N.: The Art of Multiprocessor Programming. Morgan Kaufmann, San Francisco (2008)

    Google Scholar 

  • Hesselink, W.H.: Wait-free linearization with a mechanical proof. Distr. Comput. 9, 21–36 (1995)

    Article  Google Scholar 

  • Hesselink, W.H.: A mechanical proof of Segall’s PIF algorithm. Formal Aspects Comput. 9, 208–226 (1997)

    Article  MATH  Google Scholar 

  • Hesselink, W.H.: The verified incremental design of a distributed spanning tree algorithm: extended abstract. Formal Aspects Comput. 11, 45–55 (1999)

    Article  MATH  Google Scholar 

  • Hesselink, W.H.: Using eternity variables to specify and prove a serializable database interface. Sci. Comput. Program. 51, 47–85 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  • Hesselink, W.H.: Universal extensions to simulate specifications. Inf. Comput. 206, 108–128 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  • Hesselink, W.H.: Revisiting mutual exclusion by Lycklama-Hadzilacos, PVS scripts. http://wimhesselink.nl/mechver/mx4bits (2010)

  • Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM 12, 576–583 (1969)

    Article  MATH  Google Scholar 

  • Holzmann, G.J.: The SPIN Model Checker, Primer and Reference Manual. Addison-Wesley, Reading (2004)

    Google Scholar 

  • Inoue, T., Hironaka, T., Sasaki, T., Fukae, S., Koide, T., Mattausch, H.J.: Evaluation of bank-based multiport memory architecture with blocking network. Electron. Commun. Japan 89, 498–510 (2006)

    Article  Google Scholar 

  • Israeli, A., Li, M.: Bounded time-stamps. Distr. Comput. 6, 205–209 (1993)

    Article  MATH  Google Scholar 

  • Jayanti, P., Petrovic, S.: Efficient and practical constructions of LL/SC variables. In: PODC ’03: Proceedings of the twenty-second annual symposium on Principles of Distributed Computing, pp. 285–294. ACM Press, New York, NY, USA (2003)

  • Jayanti, P., Petrovic, S.: Efficient wait-free implementation of multiword LL/SC variables. In: Proceedings of the 25th IEEE International Conference on Distributed Computing Systems (ICDCS), pp. 59–68. IEEE (2005)

  • Jayanti, P., Tan, K., Friedland, G., Katz, A.: Bounding Lamport’s Bakery algorithm. In: Proceedings of the SOFSEM, vol. 2234. LNCS, pp. 261–270 (2001)

  • Kim, Y.J., Anderson, J.H.: Nonatomic mutual exclusion with local spinning. Distr. Comput. 19, 19–61 (2006)

    Article  Google Scholar 

  • Ladkin, P., Lamport, L., Olivier, B., Roegel, D.: Lazy caching in TLA. Distr. Comput. 12, 151–174 (1999)

    Article  Google Scholar 

  • Lamport, L.: A new solution of Dijkstra’s concurrent programming problem. Commun. ACM 17, 453–455 (1974)

    Article  MathSciNet  MATH  Google Scholar 

  • Lamport, L.: Proving the correctness of multiprocess programs. IEEE Trans. Softw. Eng. SE-3 2, 125–143 (1977)

    Article  MathSciNet  Google Scholar 

  • Lamport, L.: A new approach to proving the correctness of multiprocess programs. ACM Trans. Program. Lang. Syst. 1, 84–97 (1979)

    Article  MATH  Google Scholar 

  • Lamport, L.: The mutual exclusion problem—part I: a theory of interprocess communication, part II: statement and solutions. J. ACM 33, 313–348 (1986)

    Article  MathSciNet  MATH  Google Scholar 

  • Lamport, L.: On interprocess communication. Parts I and II. Distr. Comput. 1, 77–101 (1986)

    Article  MATH  Google Scholar 

  • Lamport, L.: Win and sin: predicate transformers for concurrency. ACM Trans. Program. Lang. Syst. 12, 396–428 (1990)

    Article  Google Scholar 

  • Lamport, L.: The temporal logic of actions. ACM Trans. Program. Lang. Syst. 16, 872–923 (1994)

    Article  Google Scholar 

  • Lamport, L.: Composition: a way to make proofs harder. In: de Roever, W.-P., Pnueli, H. (eds.) Compositionality: The Significant Difference, vol. 1536. LNCS, pp. 402–423. Springer, Berlin (1997)

  • Lycklama, E.A., Hadzilacos, V.: A first-come-first-served mutual-exclusion algorithm with small communication variables. ACM Trans. Program. Lang. Syst. 13, 558–576 (1991)

    Article  Google Scholar 

  • Lynch, N.A.: Distributed Algorithms. Morgan Kaufman, San Francisco (1996)

    MATH  Google Scholar 

  • Manna, Z., Pnueli, A.: The Temporal Logic of Reactive and Concurrent Systems: Specification. Springer, New York (1992)

    Book  Google Scholar 

  • Manna, Z., Pnueli, A.: Temporal verification of reactive systems: safety. Springer, New York (1995)

    Book  Google Scholar 

  • Michael, M.M.: Practical lock-free and wait-free LL/SC/VL implementations using 64-bit CAS. In: Guerraoui, R. (ed.) 18th International Symposium on Distributed Computing, vol. 3274. LNCS, pp. 144–158 (2004)

  • Michael, M.M.: Scalable lock-free dynamic memory allocation. In: Proceedings of the 2004 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pp. 35–46 (2004)

  • Owicki, S., Gries, D.: An axiomatic proof technique for parallel programs. Acta Inf. 6, 319–340 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  • Owre, S., Shankar, N., Rushby, J.M., Stringer-Calvert, D.W.J.: PVS Version 2.4, System Guide, Prover Guide, PVS Language Reference. http://pvs.csl.sri.com (2001)

  • Raynal, M.: Algorithms for Mutual Exclusion. MIT Press, Cambridge (1986)

    MATH  Google Scholar 

  • Rusinoff, D.M.: A mechanically verified incremental garbage collector. Formal Aspects Comput. 6, 359–390 (1994)

    Article  Google Scholar 

  • Shiue, W.-T., Chakrabarti, C.: Multi-module multi-port memory design for low power embedded systems. Des. Autom. Embed. Syst. 9, 235–261 (2004)

    Article  Google Scholar 

  • Sundell, H., Tsigas, P.: Scalable and lock-free concurrent dictionaries. In: Proceedings of the 2004 ACM Symposium on Applied Computing, pp. 1438–1445. ACM Press (2004)

  • Takamura, M., Igarashi, Y.: Simple mutual exclusion algorithms based on bounded tickets on the asynchronous shared memory model. In: Proceedings of the COCOON, vol. 2387. LNCS, pp. 259–268 (2002)

  • Taubenfeld, G.: The black-white bakery algorithm and related bounded-space, adaptive, local-spinning and FIFO algorithms. In: Proceedings of the DISC, vol. 3274. LNCS, pp. 56–70 (2004)

  • Taubenfeld, G.: Synchronization Algorithms and Concurrent Programming. Pearson Education/Prentice Hall, London (2006)

    Google Scholar 

  • Tel, G.: Distributed Algorithms. Cambridge University Press, Cambridge (1994)

    Book  Google Scholar 

  • Vijayaraghavan, S.: A variant of the bakery algorithm with bounded values as a solution to Abraham’s concurrent programming problem. In: Proceedings of the Design, Analysis and Simulation of Distributed Systems (2003)

  • Welch, J., Lamport, L., Lynch, N.A.: A lattice-structured proof technique applied to a minimum-weight spanning tree algorithm. In: Proceedings 7th ACM Symposium on Principles of, Distributed Computing (1988)

  • Woo, T.-K.: A note on Lamport’s mutual exclusion algorithm. SIGOPS Oper. Syst. Rev. 24(4), 78–81 (1990)

    Article  Google Scholar 

  • Zuo, W., Qi, Z., Jiaxing, L.: An intelligent multi-port memory. In: Proceedings of the IEEE International Symposium on Information Technology Application Workshops, pp. 251–254 (2008)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Wim H. Hesselink.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Hesselink, W.H. Verifying a simplification of mutual exclusion by Lycklama–Hadzilacos. Acta Informatica 50, 199–228 (2013). https://doi.org/10.1007/s00236-013-0178-2

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00236-013-0178-2

Keywords

Navigation