Correctness and concurrent complexity of the Black-White Bakery Algorithm
- 327 Downloads
Lamport’s Bakery Algorithm (Commun ACM 17:453–455, 1974) implements mutual exclusion for a fixed number of threads with the first-come first-served property. It has the disadvantage, however, that it uses integer communication variables that can become arbitrarily large. Taubenfeld’s Black-White Bakery Algorithm (Proceedings of the DISC. LNCS, vol 3274, pp 56–70, 2004) keeps the integers bounded, and is adaptive in the sense that the time complexity only depends on the number of competing threads, say N. The present paper offers an assertional proof of correctness and shows that the concurrent complexity for throughput is linear in N, and for individual progress is quadratic in N. This is proved with a bounded version of UNITY, i.e., by assertional means.
KeywordsMutual exclusion FCFS Concurrent complexity UNITY
- AST99.Afek Y, Stupp G, Touitou D (1999) Long-lived adaptive collect with applications. In: Proceedings 40th IEEE symp. on foundations of computer science, pp 262–272Google Scholar
- BDH15.Buhr PA, Dice D, Hesselink WH (2015) High-performance N-thread software solutions for mutual exclusion. Concurr Comput Pract Exp 27:651–701. doi: 10.1002/cpe.3263
- Hes15a.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
- Hes15b.Hesselink WH (2015) PVS proof scripts for four Bakery Algorithms. http://wimhesselink.nl/mechver/bakery/index.html. Accessed 17 March 2016
- 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–576Google Scholar
- NLWSD14.Nanevski A, Ley-Wild R, Sergey I, Delbianco GA (2014) Communicating state transition systems for fine-grained concurrent resources. In: Shao Z (ed) ESOP 2014. LNCS, vol 8410, pp 290–310Google Scholar
- OSRSC01.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. Accessed 17 March 2016
- 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
Open AccessThis 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.