Abstract
A simple mutual exclusion algorithm is presented that only uses nonatomic shared variables of bounded size, and that satisfies bounded overtaking. When the shared variables behave atomically, it has the first-come-first-served property (FCFS). Nonatomic access makes information vulnerable. The effects of this can be mitigated by minimizing the information and by spreading it over more variables. The design approach adopted here begins with such mitigating efforts. These resulted in an algorithm with a proof of correctness, first for atomic variables. This proof is then used as a blueprint for the simultaneous development of the algorithm for nonatomic variables and its proof. Mutual exclusion is proved by means of invariants. Bounded overtaking and liveness under weak fairness are proved with invariants and variant functions. Liveness under weak fairness is formalized and proved in a set-theoretic version of temporal logic. All these assertions are verified with the proof assistant PVS. We heavily rely on the possibility offered by a proof assistant like PVS to reuse proofs developed for one context in a different context.
Similar content being viewed by others
References
Abadi M., Lamport L.: The existence of refinement mappings. Theor. Comput. Sci. 82, 253–284 (1991)
Abraham, U.: Bakery algorithms. In: Proceedings of the Concurrency, Specification, and Programming Workshop, pp. 7–40 (1993)
Anderson J.H.: A fine-grained solution to the mutual exclusion problem. Acta Inf. 30(3), 249–265 (1993)
Anderson J.H., Kim Y.J., Herman T.: Shared-memory mutual exclusion: major research trends since 1986. Distrib. Comput. 16, 75–110 (2003)
Aravind A.: An arbitration algorithm for multiport memory systems. IEICE Electron. Express 2, 488–494 (2005)
Aravind A.A., Hesselink W.H.: A queue based mutual exclusion algorithm. Acta Inf. 46, 73–86 (2009)
Dijkstra E.W.: Solution of a problem in concurrent programming control. Commun. ACM 8, 569 (1965)
Dijkstra E.W.: Co-operating sequential processes. In: Genuys, F. (ed.) Programming Languages, London, etc, pp. 43–112. NATO Advanced Study Institute, Academic Press, London (1968)
Haldar, S., Subramanian, P.S.: Space-optimum conflict-free construction of 1-writer 1-reader multivalued atomic variable. In: Proceedings of the 8th International Workshop on Distributed Algorithms, volume 857 of LNCS, pp. 116–129. Springer, Berlin (1994)
Herlihy M., Shavit N.: The Art of Multiprocessor Programming. Morgan Kaufmann Publishers, Los Altos (2008)
Hesselink W.H.: A challenge for atomicity verification. Sci. Comput. Program. 71, 57–72 (2008)
Hesselink, W.H.: PVS proof scripts of “nonatomic bakery algorithm with bounded tokens”. Available at http://www.cs.rug.nl/~wim/mechver/bnonatomicMX/index.html (2009)
Holzmann G.J.: The SPIN Model Checker, Primer and Reference Manual. Addison-Wesley, Reading (2004)
Inoue T., Hironaka T., Sasaki T., Fukae S., Koide T., Mattausch H.J.: Evaluation of bank-based multiport memory architecture with blocking network. Electron. Commun. Jpn 89, 498–510 (2006)
Israeli A., Li M.: Bounded time-stamps. Distrib. Comput. 6, 205–209 (1993)
Jayanti, P., Tan, K., Friedland, G., Katz, A.: Bounding Lamport’s Bakery algorithm. In: Proceedings of the SOFSEM, volume 2234 of LNCS, pp. 261–270 (2001)
Katseff, H.P.: A new solution to the critical section problem. In: Tenth Annual ACM Symposium on Theory of Computing, pp. 86–88 (1978)
Kessels J.L.W.: Arbitration without common modifiable variables. Acta Inf. 17, 135–141 (1982)
Kim Y.J., Anderson J.H.: Nonatomic mutual exclusion with local spinning. Distrib. Comput. 19, 19–61 (2006)
Lamport L.: A new solution of Dijkstra’s concurrent programming problem. Commun. ACM 17, 453–455 (1974)
Lamport L.: The mutual exclusion problem—part I: a theory of interprocess communication, part II: statement and solutions. J. ACM 33, 313–348 (1986)
Lamport L.: On interprocess communication. Parts I and II. Distrib. Comput. 1, 77–101 (1986)
Lamport, L.: The mutual exclusion problem has been solved. Commun. ACM 34(1), 110,119 (1991)
Lamport L.: The temporal logic of actions. ACM Trans. Program. Lang. Syst. 16, 872–923 (1994)
Lycklama E.A., Hadzilacos V.: A first-come-first-served mutual-exclusion algorithm with small communication variables. ACM Trans. Program. Lang. Syst. 13, 558–576 (1991)
Owicki S., Gries D.: An axiomatic proof technique for parallel programs. Acta Inf. 6, 319–340 (1976)
Owre, S., Shankar, N., Rushby, J.M., Stringer-Calvert, D.W.J.: PVS Version 2.4, System Guide, Prover Guide, PVS Language Reference. http://pvs.csl.sri.com (2001)
Peterson G.L.: Myths about the mutual exclusion problem. Inf. Process. Lett. 12, 115–116 (1981)
Peterson G.L.: A new solution to Lamport’s concurrent programming problem using small shared variables. ACM Trans. Program. Lang. Syst. 5(1), 56–65 (1983)
Raynal M.: Algorithms for Mutual Exclusion. MIT Press, Cambridge (1986)
Shiue W.-T., Chakrabarti C.: Multi-module multi-port memory design for low power embedded systems. Design Autom. Embed. Syst. 9, 235–261 (2004)
Takamura, M., Igarashi, Y.: Simple mutual exclusion algorithms based on bounded tickets on the asynchronous shared memory model. In: Proceedings of the COCOON, volume 2387 of LNCS, pp. 259–268 (2002)
Taubenfeld, G.: The black-white bakery algorithm and related bounded-space, adaptive, local-spinning and FIFO algorithms. In: Proceedings of the DISC, volume 3274 of LNCS, pp. 56–70 (2004)
Taubenfeld G.: Synchronization Algorithms and Concurrent Programming. Pearson Education/Prentice Hall, Englewood Cliffs (2006)
Vijayaraghavan, S.: A variant of the bakery algorithm with bounded values as a solution to Abraham’s concurrent programming problem. In: Proceedings of Design, Analysis and Simulation of Distributed Systems (2003)
Vitányi, P.M.B.: Registers. In: Encyclopedia of Algorithms, pp. 761–764. Springer, Berlin (2008)
Vitányi, P.M.B., Awerbuch, B.: Atomic shared register access by asynchronous hardware. In: 27th Annual Symposium on Foundations of Computer Science, pp. 233–243. IEEE, Los Alamitos, California, 1986. Corrigendum in 28th Annual Symposium on Foundations of Computer Science, p. 487. Los Angeles (1987)
Woo T.-K.: A note on Lamport’s mutual exclusion algorithm. SIGOPS Oper. Syst. Rev. 24(4), 78–81 (1990)
Zuo, W., Qi, Z., Jiaxing, L.: An intelligent multi-port memory. In: Proceedings of the IEEE International Symposium on Information Technology Application Workshops, pp. 251–254 (2008)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Aravind, A.A., Hesselink, W.H. Nonatomic dual bakery algorithm with bounded tokens. Acta Informatica 48, 67–96 (2011). https://doi.org/10.1007/s00236-011-0132-0
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00236-011-0132-0