Skip to main content

Formal Analysis of the Bakery Protocol with Consideration of Nonatomic Reads and Writes

  • Conference paper
Formal Methods and Software Engineering (ICFEM 2008)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5256))

Included in the following conference series:

Abstract

The bakery protocol is the first real solution of the mutual exclusion problem. It does not assume any lower mutual exclusion protocols. The bakery protocol has been often used as a benchmark to demonstrate that proposed verification methods and/or tools are powerful enough. But, the true bakery protocol has been rarely used. We have formally proved that the protocol satisfies the mutual exclusion property. The proof is mechanized with CafeOBJ, an algebraic specification language, in which state machines as well as data types can be specified. Nonatomic reads and writes to shared variables are formalized by representing an assignment to a shared variable with multiple atomic transitions. Our formal model of the protocol has states in which a shared variable is being modified. A read to the variable in such states obtains an arbitrary value, which is represented as a CafeOBJ term.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Dijkstra, E.W.: Solution of a problem in concurrent programming control. CACM 8, 569 (1965)

    Article  Google Scholar 

  2. Lamport, L.: A new solution of Dijkstra’s concurrent programming problem. CACM 17, 453–455 (1974)

    Article  MathSciNet  MATH  Google Scholar 

  3. Mori, A., Futatsugi, K.: Cafeobj as a tool for behavioral system verification. In: Okada, M., Pierce, B.C., Scedrov, A., Tokuda, H., Yonezawa, A. (eds.) ISSS 2002. LNCS, vol. 2609, pp. 2–16. Springer, Heidelberg (2003)

    Google Scholar 

  4. Meseguer, J., Palomino, M., Martí-Oliet, N.: Equational abstraction. In: Baader, F. (ed.) CADE 2003. LNCS (LNAI), vol. 2741, pp. 2–16. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  5. de Moura, L., Rueß, H., Sorea, M.: Bounded model checking and induction: From refutation to verification. In: Hunt Jr., W.A., Somenzi, F. (eds.) CAV 2003. LNCS, vol. 2725, pp. 14–26. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  6. Lamport, L.: A new approach to proving the correctness of multiprocess programs. ACM TOPLAS 1, 84–97 (1979)

    Article  MATH  Google Scholar 

  7. Lamport, L.: win and sin: Predicate transformers for concurrency. ACM TOPLAS 12, 396–428 (1990)

    Article  Google Scholar 

  8. Lamport, L.: Proving the correctness of multiprocess programs. IEEE TSE SE-3, 125–143 (1977)

    MathSciNet  MATH  Google Scholar 

  9. Ogata, K., Futatsugi, K.: Proof scores in the OTS/CafeOBJ method. In: Najm, E., Nestmann, U., Stevens, P. (eds.) FMOODS 2003. LNCS, vol. 2884, pp. 170–184. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  10. Ogata, K., Futatsugi, K.: Some tips on writing proof scores in the OTS/CafeOBJ method. In: Futatsugi, K., Jouannaud, J.-P., Meseguer, J. (eds.) Algebra, Meaning, and Computation. LNCS, vol. 4060, pp. 596–615. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  11. Diaconescu, R., Futatsugi, K.: CafeOBJ report: The Language, Proof Techniques, and Methodologies for Object-Oriented Algebraic Specification. AMAST Series in Computing, vol. 6. World Scientific, Singapore (1998)

    MATH  Google Scholar 

  12. Peterson, G.L.: Myths about the mutual exclusion problem. IPL 12, 115–116 (1981)

    Article  MATH  Google Scholar 

  13. Anderson, T.E.: The performance of spin lock alternatives for shared-memory multiprocessors. IEEE TPDS 1, 6–16 (1990)

    Google Scholar 

  14. Mellor-Crummery, J.M., Scott, L.: Algorithms for scalable synchronization on shared-memory multiprocessors. ACM TOCS 9, 21–65 (1991)

    Article  Google Scholar 

  15. Hsiang, J., Dershowitz, N.: Rewrite methods for clausal and nonclausal theorem proving. In: Díaz, J. (ed.) ICALP 1983. LNCS, vol. 154, pp. 331–346. Springer, Heidelberg (1983)

    Chapter  Google Scholar 

  16. Nakamura, M., Futatsugi, K.: On equality predicates in algebraic specification languages. In: Jones, C.B., Liu, Z., Woodcock, J. (eds.) ICTAC 2007. LNCS, vol. 4711, pp. 381–395. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  17. Eker, S., Meseguer, J., Sridharanarayanan, A.: The Maude LTL model checker. In: 4th WRLA. ENTCS, vol. 71. Elsevier, Amsterdam (2004)

    Google Scholar 

  18. Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.: All About Maude – A High-Performance Logical Framework: How to Specify, Program and Verify Systems in Rewriting Logic. In: Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C. (eds.) All About Maude - A High-Performance Logical Framework. LNCS, vol. 4350. Springer, Heidelberg (2007)

    Google Scholar 

  19. de Moura, L., Owre, S., Rueß, H., Rushby, J., Shankar, N., Sorea, M., Tiwari, A.: SAL 2. In: Alur, R., Peled, D.A. (eds.) CAV 2004. LNCS, vol. 3114, pp. 496–500. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  20. Anderson, J.H., Gouda, M.G.: Atomic semantics of nonatomic programs. IPL 28, 99–103 (1988)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Ogata, K., Futatsugi, K. (2008). Formal Analysis of the Bakery Protocol with Consideration of Nonatomic Reads and Writes. In: Liu, S., Maibaum, T., Araki, K. (eds) Formal Methods and Software Engineering. ICFEM 2008. Lecture Notes in Computer Science, vol 5256. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-88194-0_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-88194-0_13

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-88193-3

  • Online ISBN: 978-3-540-88194-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics