Formal Aspects of Computing

, Volume 29, Issue 5, pp 833–852 | Cite as

Tournaments for mutual exclusion: verification and concurrent complexity

  • Wim H. Hesselink
Open Access
Original Article


Given a mutual exclusion algorithm MXd for \({d \geq 2}\) threads, a mutual exclusion algorithm for \({N > d}\) threads can be built in a tree of degree d with N leaves, with the critical section at the root of the tree. This tournament solution seems obviously correct and efficient. The present note proves the correctness, and formalizes the efficiency in terms of concurrent complexity by means of Bounded Unity. If the tree is balanced, the throughput is logarithmic in N. If moreover MXd satisfies FCFS (first-come first-served), the worst case individual delay of the tournament algorithm is of order N. This is optimal.


Mutual exclusion unity Concurrency Shared variables Concurrent complexity 


  1. AdBO09.
    Apt KR, de Boer FS, Olderog E-R (2009) Verification of sequential and concurrent programs. Springer, New YorkGoogle Scholar
  2. BDH15.
    Buhr PA, Dice D, Hesselink WH (2015) High-performance N-thread software solutions for mutual exclusion. Concurr Comput Pract Exper. 27:651–701. doi: 10.1002/cpe.3263
  3. BDH16.
    Buhr PA, Dice D, Hesselink WH (2016) Dekker’s mutual exclusion algorithm made RW-safe. Concurr Comput Pract Exp 28:144–165. doi: 10.1002/cpe.3659
  4. Bur81.
    Burns JE (1981) Complexity of communication among asynchronous parallel processes, Ph.D. thesis, School of Information and Computer Science, Georgia Institute of TechnologyGoogle Scholar
  5. CM88.
    Chandy KM, Misra J (1988) Parallel program design, a foundation. Addison-Wesley, USAzbMATHGoogle Scholar
  6. dB67.
    de Bruijn NG (1967) Additional comments on a problem in concurrent programming control. Commun ACM 10:137–138 (Letter to the Editor) Google Scholar
  7. Dij65.
    Dijkstra EW (1965) Solution of a problem in concurrent programming control. Commun ACM 8: 569CrossRefGoogle Scholar
  8. Hes99.
    Hesselink WH (1999) Progress under bounded fairness. Distrib Comput 12: 197–207CrossRefGoogle Scholar
  9. Hes15.
    Hesselink WH (2015) Mutual exclusion by four shared bits with not more than quadratic complexity. Sci Comput Program 102:57–75. doi: 10.1016/j.scico.2015.01.001
  10. Hes16a.
    Hesselink WH (2016) Correctness and concurrent complexity of the Black-White Bakery algorithm. Formal Aspects Comput 28:325–341. doi: 10.1007/s00165-016-0364-4
  11. Hes16b.
    Hesselink WH (2016) PVS proof script for: tournaments for mutual exclusion. (Accessed 8 Aug 2016)
  12. Kes82.
    Kessels DE (1982) Arbitration without common modifiable variables. Acta Inf 17:135–141Google Scholar
  13. Knu66.
    Knuth DE (1966) Additional comments on a problem in concurrent programming control. Commun ACM 9:321–322 (Letter to the Editor) Google Scholar
  14. Lam74.
    Lamport L (1974) A new solution of Dijkstra’s concurrent programming problem. Commun ACM 17: 453–455MathSciNetCrossRefzbMATHGoogle Scholar
  15. Lam86.
    Lamport L (1986) The mutual exclusion problem—part I: a theory of interprocess communication, part II: statement and solutions. J ACM 33: 313–348CrossRefzbMATHGoogle Scholar
  16. LH91.
    Lycklama EA, Hadzilacos V (1991) A first-come-first-served mutual-exclusion algorithm with small communication variables. ACM Trans Program Lang Syst 13: 558–576CrossRefGoogle Scholar
  17. MCS91.
    Mellor-Crummey JM, Scott ML (1991) Algorithm for scalable synchronization on shared-memory multiprocessors. ACM Trans Comput Syst 9: 21–65CrossRefGoogle Scholar
  18. Mis01.
    Misra J (2001) A discipline of multiprogramming: programming theory for distributed applications. Springer, New YorkCrossRefzbMATHGoogle Scholar
  19. OG76.
    Owicki S, Gries D (1976) An axiomatic proof technique for parallel programs. Acta Inf 6: 319–340MathSciNetCrossRefzbMATHGoogle Scholar
  20. OSRSC01.
    Owre S, Shankar N, Rushby JM, Stringer-Calvert DWJ (2001) PVS Version 2.4, System Guide, Prover Guide, PVS Language Reference.
  21. Pet81.
    Peterson GL (1981) Myths about the mutual exclusion problem. Inf Process Lett 12: 115–116CrossRefzbMATHGoogle Scholar
  22. PF77.
    Peterson GL, Fischer MJ (1977) Economical solutions for the critical section problem in a distributed system (extended abstract). In: STOC ’77: Proceedings of the 9th annual ACM symposium on theory of computing, New York. ACM, pp 91–97Google Scholar
  23. Tau04.
    Taubenfeld G (2004) The Black-White Bakery Algorithm and related bounded-space, adaptive, local-spinning and FIFO algorithms. In: Proceedings of the DISC, LNCS, vol 3274, pp 56–70Google Scholar
  24. XdRH97.
    Xu Q, de Roever W-P, He J (1997) The rely-guarantee method for verifying shared variable concurrent programs. Formal Aspects Comput 9:149–174Google Scholar
  25. ZYC96.
    Zhang X, Yan Y, Castenada R (1996) Evaluating and designing software mutual exclusion algorithms on shared memory multiprocessors. IEEE Parallel Distrib Technol Syst Appl 4:25–42Google Scholar

Copyright information

© The Author(s) 2017

Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (, which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Authors and Affiliations

  1. 1.Johann Bernoulli Institute for Mathematics and Computer Science University of GroningenGroningenThe Netherlands

Personalised recommendations