Formal Aspects of Computing

, Volume 28, Issue 2, pp 325–341

Correctness and concurrent complexity of the Black-White Bakery Algorithm

Open Access
Original Article

DOI: 10.1007/s00165-016-0364-4

Cite this article as:
Hesselink, W.H. Form Asp Comp (2016) 28: 325. doi:10.1007/s00165-016-0364-4


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.


Mutual exclusion FCFS Concurrent complexity UNITY 

Copyright information

© The Author(s) 2016

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 InstituteUniversity of GroningenGroningenThe Netherlands

Personalised recommendations