Abstract
A mutual exclusion algorithm is presented that has four desired properties: (1) it satisfies FIFO fairness, (2) it satisfies local-spinning, (3) it is adaptive, and (4) it uses finite number of bounded size atomic registers. No previously published algorithm satisfies all these properties. In fact, it is the first algorithm (using only atomic registers) which satisfies both FIFO and local-spinning, and it is the first bounded space algorithm which satisfies both FIFO and adaptivity.
All the algorithms presented are based on Lamport’s famous Bakery algorithm [27], which satisfies FIFO, but uses unbounded size registers (and does not satisfy local-spinning and is not adaptive). Using only one additional shared bit, we bound the amount of space required by the Bakery algorithm by coloring the tickets taken in the Bakery algorithm. The resulting Black-White Bakery algorithm preserves the simplicity and elegance of the original algorithm, satisfies FIFO and uses finite number of bounded size registers. Then, in a sequence of steps (which preserve simplicity and elegance) we modify the new algorithm so that it is also adaptive to point contention and satisfies local-spinning.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Abraham, U.: Bakery algorithms. In: Proc. of the Concurrency, Specification and Programming Workshop, pp. 7–40 (1993)
Afek, Y., Dolev, D., Gafni, E., Merritt, M., Shavit, N.: A bounded first-in, firstenabled solution to the l-exclusion problem. ACM Transactions on Programming Languages and Systems 16(3), 939–953 (1994)
Afek, Y., Stupp, G., Touitou, D.: Long-lived adaptive collect with applications. In: Proc. 40th IEEE Symp. on Foundations of Computer Science, pp. 262–272 (1999)
Afek, Y., Stupp, G., Touitou, D.: Long lived adaptive splitter and applications. Distributed Computing 30, 67–86 (2002)
Anderson, J.H.: A fine-grained solution to the mutual exclusion problem. Acta Informatica 30(3), 249–265 (1993)
Anderson, J.H., Kim, Y.-J.: Adaptive mutual exclusion with local spinning. In: Herlihy, M.P. (ed.) DISC 2000. LNCS, vol. 1914, pp. 29–43. Springer, Heidelberg (2000)
Anderson, J.H., Kim, Y.-J.: Nonatomic mutual exclusion with local spinning. In: Proc. 21st ACM Symp. on Principles of Distributed Computing, pp. 3–12 (2002)
Anderson, J., Kim, Y.-J., Herman, T.: Shared-memory mutual exclusion: Major research trends since 1986. Distributed Computing 16, 75–110 (2003)
Anderson, T.E.: The performance of spin lock alternatives for shared-memory multiprocessor. IEEE Trans. on Parallel and Distributed Systems 1(1), 6–16 (1990)
Attiya, H., Bortnikov, V.: Adaptive and efficient mutual exclusion. Distributed Computing 15(3), 177–189 (2002)
Attiya, H., Fouren, A.: Algorithms adapting to point contention. Journal of the ACM 50(4), 144–468 (2003)
Burns, J.E., Lynch, A.N.: Mutual exclusion using indivisible reads and writes. In: 18th annual allerton conf. on comm., control and computing, pp. 833–842 (1980)
Burns, J.N., Lynch, N.A.: Bounds on shared-memory for mutual exclusion. Information and Computation 107(2), 171–184 (1993)
Choy, M., Singh, A.K.: Adaptive solutions to the mutual exclusion problem. Distributed Computing 8(1), 1–17 (1994)
Dijkstra, E.W.: Solution of a problem in concurrent programming control. Communications of the ACM 8(9), 569 (1965)
Dolev, D., Shavit, N.: Bounded concurrent time-stamping. SIAM Journal on Computing 26(2), 418–455 (1997)
Dwork, C., Waarts, O.: Simple and efficient bounded concurrent timestamping or bounded concurrent timestamp systems are comprehensible! In: Proc. 24rd ACM Symp. on Theory of Computing, May 1992, pp. 655–666 (1992)
Fischer, M.J., Lynch, N.A., Burns, J.E., Borodin, A.: Distributed FIFO allocation of identical resources using small shared space. ACM Trans. on Programming Languages and Systems 11(1), 90–114 (1989)
Friedberg, S.A., Peterson, G.L.: An efficient solution to the mutual exclusion problem using weak semaphores. Info. Processing Letters 25(5), 343–347 (1987)
Gawlick, R., Lynch, N.A., Shavit, N.: Concurrent timestamping made simple. In: Israel Symposium on Theory of Computing Systems, pp. 171–183 (1992)
Graunke, G., Thakkar, S.: Synchronization algorithms for shared-memory multiprocessors. IEEE Computers 28(6), 69–69 (1990)
Israeli, A., Li, M.: Bounded time-stamps. Distributed Computing 6(4), 205–209 (1993)
Inoue, M., Umetani, S., Masuzawa, T., Fujiwara, H.: Adaptive long-lived O(k 2)-renaming with O(k 2) steps. In: Welch, J.L. (ed.) DISC 2001. LNCS, vol. 2180, pp. 123–135. Springer, Heidelberg (2001)
Jayanti, P.: Adaptive and efficient abortable mutual exclusion. In: Proc. 22nd ACM Symp. on Principles of Distributed Computing, July 2003, pp. 295–304 (2003)
Jayanti, P., Tan, K., Friedland, G., Katz, A.: Bounding Lamport’s Bakery algorithm. In: Pacholski, L., Ružička, P. (eds.) SOFSEM 2001. LNCS, vol. 2234, pp. 261–270. Springer, Heidelberg (2001)
Katseff, H.P.: A new solution to the critical section problem. In: Proc. 10th ACM Symp. on Theory of Computing, May 1978, pp. 86–88 (1978)
Lamport, L.: A new solution of Dijkstra’s concurrent programming problem. Communications of the ACM 17(8), 453–455 (1974)
Lamport, L.: A bug in the Bakery algorithm. Technical Report CA–7704–0611, Massachusette computer associates, inc. (April 1977)
Lamport, L.: The mutual exclusion problem: Part II – statement and solutions. Journal of the ACM 33, 327–348 (1986)
Lycklama, E.A.: A first-come-first-served solution to the critical section problem using five bits. M.Sc. thesis, University of Toronto (October 1987)
Lycklama, E.A., Hadzilacos, V.: A first-come-first-served mutual exclusion algorithm with small communication variables. ACM Trans. on Programming Languages and Systems 13(4), 558–576 (1991)
Lynch, N.A.: Distributed Algorithms. Morgan Kaufmann Publishers, Inc., San Francisco (1996)
Morris, J.M.: A starvation-free solution to the mutual exclusion problem. Information Processing Letters 8(2), 76–80 (1979)
Mellor-Crummey, J.M., Scott, M.L.: Algorithms for scalable synchronization on shared-memory multiprocessors. ACM Trans. on Computer Systems 9(1), 21–65 (1991)
Alur, R., Taubenfeld, G.: Results about fast mutual exclusion. In: Proceedings of the 13th IEEE Real-Time Systems Symposium, December 1992, pp. 12–21 (1992)
Merritt, M., Taubenfeld, G.: Speeding Lamport’s fast mutual exclusion algorithm. Information Processing Letters 45, 137–142 (1993) (Published as an AT&T technical memorandum, May 1991)
Merritt, M., Taubenfeld, G.: Computing with infinitely many processes. In: Herlihy, M.P. (ed.) DISC 2000. LNCS, vol. 1914, pp. 164–178. Springer, Heidelberg (2000)
Peterson, G.L., Fischer, M.J.: Economical solutions for the critical section problem in a distributed system. In: Proc. 9th ACM Symp. on Theory of Computing, pp. 91–97 (1977)
Raynal, M.: Algorithms for mutual exclusion. The MIT Press, Cambridge (1986)
Vijayaraghavan, S.: A variant of the bakery algorithm with bounded values as a solution to Abraham’s concurrent programming problem. In: Proc. of Design, Analysis and Simulation of Distributed Systems (2003)
Scott, M.L.: Non-blocking timeout in scalable queue-based spin locks. In: Proc. 21th ACM Symp. on Principles of Distributed Computing, July 2002, pp. 31–40 (2002)
Szymanski, B.K.: Mutual exclusion revisited. In: Proc. of the 5th Jerusalem Conf. on Information Technology, October 1990, pp. 110–117 (1990)
Woo, T.: A note on Lamport’s mutual exclusion algorithm. Operating Systems Review (ACM) 24(4), 78–80 (1990)
Yang, J.-H., Anderson, J.H.: Fast, scalable synchronization with minimal hardware support. In: Proc. 12th ACM Symp. on Principles of Distributed Computing, pp. 171–182 (1993)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Taubenfeld, G. (2004). The Black-White Bakery Algorithm and Related Bounded-Space, Adaptive, Local-Spinning and FIFO Algorithms. In: Guerraoui, R. (eds) Distributed Computing. DISC 2004. Lecture Notes in Computer Science, vol 3274. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30186-8_5
Download citation
DOI: https://doi.org/10.1007/978-3-540-30186-8_5
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-23306-0
Online ISBN: 978-3-540-30186-8
eBook Packages: Springer Book Archive