Abstract
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.
References
Apt KR, de Boer FS, Olderog E-R (2009) Verification of sequential and concurrent programs. Springer, New York
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
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
Burns JE (1981) Complexity of communication among asynchronous parallel processes, Ph.D. thesis, School of Information and Computer Science, Georgia Institute of Technology
Chandy KM, Misra J (1988) Parallel program design, a foundation. Addison-Wesley, USA
de Bruijn NG (1967) Additional comments on a problem in concurrent programming control. Commun ACM 10:137–138 (Letter to the Editor)
Dijkstra EW (1965) Solution of a problem in concurrent programming control. Commun ACM 8: 569
Hesselink WH (1999) Progress under bounded fairness. Distrib Comput 12: 197–207
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
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
Hesselink WH (2016) PVS proof script for: tournaments for mutual exclusion. http://wimhesselink.nl/mechver/tournaments (Accessed 8 Aug 2016)
Kessels DE (1982) Arbitration without common modifiable variables. Acta Inf 17:135–141
Knuth DE (1966) Additional comments on a problem in concurrent programming control. Commun ACM 9:321–322 (Letter to the Editor)
Lamport L (1974) A new solution of Dijkstra’s concurrent programming problem. Commun ACM 17: 453–455
Lamport L (1986) The mutual exclusion problem—part I: a theory of interprocess communication, part II: statement and solutions. J ACM 33: 313–348
Lycklama EA, Hadzilacos V (1991) A first-come-first-served mutual-exclusion algorithm with small communication variables. ACM Trans Program Lang Syst 13: 558–576
Mellor-Crummey JM, Scott ML (1991) Algorithm for scalable synchronization on shared-memory multiprocessors. ACM Trans Comput Syst 9: 21–65
Misra J (2001) A discipline of multiprogramming: programming theory for distributed applications. Springer, New York
Owicki S, Gries D (1976) An axiomatic proof technique for parallel programs. Acta Inf 6: 319–340
Owre S, Shankar N, Rushby JM, Stringer-Calvert DWJ (2001) PVS Version 2.4, System Guide, Prover Guide, PVS Language Reference. http://pvs.csl.sri.com
Peterson GL (1981) Myths about the mutual exclusion problem. Inf Process Lett 12: 115–116
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–97
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–70
Xu Q, de Roever W-P, He J (1997) The rely-guarantee method for verifying shared variable concurrent programs. Formal Aspects Comput 9:149–174
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–42
Author information
Authors and Affiliations
Corresponding author
Additional information
Xinyu Feng
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), 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.
About this article
Cite this article
Hesselink, W.H. Tournaments for mutual exclusion: verification and concurrent complexity. Form Asp Comp 29, 833–852 (2017). https://doi.org/10.1007/s00165-016-0407-x
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00165-016-0407-x
Keywords
- Mutual exclusion
- unity
- Concurrency
- Shared variables
- Concurrent complexity