Skip to main content

Data Independence for Software Transactional Memory

  • Conference paper
  • First Online:
NASA Formal Methods (NFM 2019)

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

Included in the following conference series:

  • 997 Accesses

Abstract

Software Transactional Memory (STM) algorithms provide programmers with a synchronisation mechanism for concurrent access to shared variables. Basically, programmers can specify transactions (reading from and writing to shared state) which then execute in a “seeming” atomicity. This property is captured in a correctness criterion called opacity. For model checking the opacity of an STM algorithm, we – in principle – need to check opacity for all possible combinations of transactions with all possible values to be written. This leads to several sources of infinity during model checking: infinitely many data values, infinitely many possible accesses in transactions, and unboundedly many transactions being executed.

In this paper, we propose a technique for avoiding the first source of infinity: infinitely many different data values. To this end, we employ a notion of data independence and provide two results. First, we prove that opacity as a correctness criterion is data independent. Second, we develop conditions for checking data independence of STM algorithms and show their soundness. Together, these results allow to reduce model checking (of data independent STMs) to transactions with a single choice for values written.

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 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 74.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

Notes

  1. 1.

    This is the main difference to [2]: Abdulla et al. only have data values as they consider operations on concurrent data structures where the data structure is fixed and thus need not be a parameter to the method.

  2. 2.

    Note that non-data values are not counted here.

  3. 3.

    Note that a transaction writes at most once to a location.

  4. 4.

    Meta data cannot be accessed via TM operations.

References

  1. Abdulla, P.A., Dwarkadas, S., Rezine, A., Shriraman, A., Zhu, Y.: Verifying safety and liveness for the FlexTM hybrid transactional memory. In: DATE 2013, pp. 785–790 (2013)

    Google Scholar 

  2. Abdulla, P.A., Haziza, F., Holík, L., Jonsson, B., Rezine, A.: An integrated specification and verification technique for highly concurrent data structures. In: Piterman, N., Smolka, S.A. (eds.) TACAS 2013. LNCS, vol. 7795, pp. 324–338. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-36742-7_23

    Chapter  MATH  Google Scholar 

  3. Baek, W., Bronson, N.G., Kozyrakis, C., Olukotun, K.: Implementing and evaluating a model checker for transactional memory systems. In: ICECCS 2010, pp. 117–126 (2010)

    Google Scholar 

  4. Bouajjani, A., Enea, C., Guerraoui, R., Hamza, J.: On verifying causal consistency. SIGPLAN Not. 52(1), 626–638 (2017)

    Article  Google Scholar 

  5. Bouajjani, A., Enea, C., Wang, C.: Checking linearizability of concurrent priority queues. In: CONCUR 2017. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2017)

    Google Scholar 

  6. Dalessandro, L., Dice, D., Scott, M., Shavit, N., Spear, M.: Transactional mutex locks. In: D’Ambra, P., Guarracino, M., Talia, D. (eds.) Euro-Par 2010. LNCS, vol. 6272, pp. 2–13. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-15291-7_2

    Chapter  Google Scholar 

  7. Derrick, J., Dongol, B., Schellhorn, G., Travkin, O., Wehrheim, H.: Verifying opacity of a transactional mutex lock. In: Bjørner, N., de Boer, F. (eds.) FM 2015. LNCS, vol. 9109, pp. 161–177. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-19249-9_11

    Chapter  Google Scholar 

  8. Doherty, S., Dongol, B., Derrick, J., Schellhorn, G., Wehrheim, H.: Proving opacity of a pessimistic STM. In: OPODIS 2016. LIPIcs, vol. 70, pp. 35:1–35:17. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2017)

    Google Scholar 

  9. Doherty, S., Groves, L., Luchangco, V., Moir, M.: Towards formally specifying and verifying transactional memory. Formal Aspects Comput. 25(5), 769–799 (2013)

    Article  MathSciNet  Google Scholar 

  10. Guerraoui, R., Henzinger, T.A., Singh, V.: Completeness and nondeterminism in model checking transactional memories. In: van Breugel, F., Chechik, M. (eds.) CONCUR 2008. LNCS, vol. 5201, pp. 21–35. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-85361-9_6

    Chapter  Google Scholar 

  11. Guerraoui, R., Henzinger, T.A., Singh, V.: Model checking transactional memories. Distrib. Comput. 22(3), 129–145 (2010)

    Article  Google Scholar 

  12. Guerraoui, R., Kapalka, M.: On the correctness of transactional memory. In: Proceedings of the 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2008, pp. 175–184 (2008)

    Google Scholar 

  13. Kaynar, D.K., Lynch, N.A., Segala, R., Vaandrager, F.W.: The Theory of Timed I/O Automata. Synthesis Lectures on Distributed Computing Theory, 2nd edn. Morgan & Claypool Publishers, San Rafael (2010)

    MATH  Google Scholar 

  14. König, J., Wehrheim, H.: Value-based or conflict-based? Opacity definitions for STMs. In: Hung, D., Kapur, D. (eds.) ICTAC 2017. LNCS, vol. 10580, pp. 118–135. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-67729-3_8

    Chapter  Google Scholar 

  15. Lesani, M., Palsberg, J.: Decomposing opacity. In: Kuhn, F. (ed.) DISC 2014. LNCS, vol. 8784, pp. 391–405. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-45174-8_27

    Chapter  Google Scholar 

  16. Shacham, O., et al.: Verifying atomicity via data independence. In: Proceedings of the 2014 International Symposium on Software Testing and Analysis, pp. 26–36. ACM (2014)

    Google Scholar 

  17. Shavit, N., Touitou, D.: Software transactional memory. Distrib. Comput. 10(2), 99–116 (1997)

    Article  Google Scholar 

  18. Wang, C., Lv, Y., Wu, P.: Decomposable relaxation for concurrent data structures. In: Steffen, B., Baier, C., van den Brand, M., Eder, J., Hinchey, M., Margaria, T. (eds.) SOFSEM 2017. LNCS, vol. 10139, pp. 188–202. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-51963-0_15

    Chapter  Google Scholar 

  19. Wolper, P.: Expressing interesting properties of programs in propositional temporal logic. In: POPL, pp. 184–193 (1986)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jürgen König .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

König, J., Wehrheim, H. (2019). Data Independence for Software Transactional Memory. In: Badger, J., Rozier, K. (eds) NASA Formal Methods. NFM 2019. Lecture Notes in Computer Science(), vol 11460. Springer, Cham. https://doi.org/10.1007/978-3-030-20652-9_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-20652-9_18

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-20651-2

  • Online ISBN: 978-3-030-20652-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics