An Abort-Aware Model of Transactional Programming

  • Kousha Etessami
  • Patrice Godefroid
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5403)

Abstract

There has been a lot of recent research on transaction-based concurrent programming, aimed at offering an easier concurrent programming paradigm that enables programmers to better exploit the parallelism of modern multi-processor machines, such as multi-core microprocessors. We introduce Transactional State Machines (TSMs) as an abstract finite-data model of transactional shared-memory concurrent programs. TSMs are a variant of concurrent boolean programs (or concurrent extended recursive state machines) augmented with additional constructs for specifying potentially nested transactions. Namely, some procedures (or code segments) can be marked as transactions and are meant to be executed “atomically”, and there are also explicit commit and abort operations for transactions. The TSM model is non-blocking and allows interleaved executions where multiple processes can simultaneously be executing inside transactions. It also allows nested transactions, transactions which may never terminate, and transactions which may be aborted explicitly, or aborted automatically by the run-time environment due to memory conflicts.

We show that concurrent executions of TSMs satisfy a correctness criterion closely related to serializability, which we call stutter-serializability, with respect to shared memory. We initiate a study of model checking problems for TSMs. Model checking arbitrary TSMs is easily seen to be undecidable, but we show it is decidable in the following case: when recursion is exclusively used inside transactions in all (but one) of the processes, we show that model checking such TSMs against all stutter-invariant ω-regular properties of shared memory is decidable.

Keywords

Shared Memory Shared Variable Transactional Memory Concurrent Execution Model Check Problem 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Abadi, M., Birrell, A., Harris, T., Isard, M.: Semantics of Transactional Memory and Automatic Mutual Exclusion. In: Proceedings of POPL 2008 (2008)Google Scholar
  2. 2.
    Alur, R., Benedikt, M., Etessami, K., Godefroid, P., Reps, T., Yannakakis, M.: Analysis of recursive state machines. ACM Trans. Program. Lang. Syst. 27(4), 786–818 (2005)CrossRefGoogle Scholar
  3. 3.
    Alur, R., Chaudhuri, S., Etessami, K., Madhusudan, P.: On-the-fly reachability and cycle detection for recursive state machines. In: Halbwachs, N., Zuck, L.D. (eds.) TACAS 2005. LNCS, vol. 3440, pp. 61–76. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  4. 4.
    Alur, R., McMillan, K.L., Peled, D.: Model-checking of correctness conditions for concurrent objects. Inf. Comput. 160(1-2), 167–188 (2000)MathSciNetCrossRefMATHGoogle Scholar
  5. 5.
    Ball, T., Rajamani, S.: Bebop: A symbolic model checker for boolean programs. In: Havelund, K., Penix, J., Visser, W. (eds.) SPIN 2000. LNCS, vol. 1885, pp. 113–130. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  6. 6.
    Bernstein, P., Hadzilacos, V., Goodman, N.: Concurrency control and Recovery in Database Systems. Addison-Wesley, Reading (1987)Google Scholar
  7. 7.
    Blundell, C., Lewis, E.C., Martin, M.M.K.: Subtleties of Transactional Memory Atomicity Semantics. IEEE Computer Architecture Letters 5(2) (2006)Google Scholar
  8. 8.
    Bobba, J., Rajwar, R., Hill, M. (eds.): Transactional memory bibliography (online), http://www.cs.wisc.edu/trans-memory/biblio/index.html
  9. 9.
    Bouajjani, A., Esparza, J., Touili, T.: A Generic Approach to the Static Analysis of Concurrent Programs with Procedures. In: Proceedings of POPL 2003 (2003)Google Scholar
  10. 10.
    Cohen, A., O’Leary, J.W., Pnueli, A., Tuttle, M.R., Zuck, L.D.: Verifying Correctness of Transactional Memories. In: Proceedings of FMCAD 2007 (Formal Methods in Computer-Aided Design) (2007)Google Scholar
  11. 11.
    Etessami, K.: Stutter-invariant languages, ω-automata, and temporal logic. In: Halbwachs, N., Peled, D.A. (eds.) CAV 1999. LNCS, vol. 1633, pp. 236–248. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  12. 12.
    Etessami, K., Godefroid, P.: An Abort-Aware Model of Transactional Programming. Technical Report MSR-TR-2008-159, Microsoft Research (2008)Google Scholar
  13. 13.
    Grossman, D., Manson, J., Pugh, W.: What Do High-Level Memory Models Mean for Transactions? In: Memory System Performance and Correctness (MSPC 2006), pp. 62–69 (2006)Google Scholar
  14. 14.
    Guerraoui, R., Kapalka, M.: On the correctness of transactional memory. In: Proc. 13th ACM PPoPP, pp. 175–184 (2008)Google Scholar
  15. 15.
    Herlihy, M., Luchangco, V., Moir, M., Scherer III., W.N.: Software transactional memory for dynamic-sized data structures. In: Proc. of 22nd Symp. on Principles of Distributed Computing (PODC), pp. 92–101 (2003)Google Scholar
  16. 16.
    Kahlon, V., Ivančić, F., Gupta, A.: Reasoning About Threads Communicating via Locks. In: Etessami, K., Rajamani, S.K. (eds.) CAV 2005. LNCS, vol. 3576, pp. 505–518. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  17. 17.
    Lamport, L.: What good is temporal logic. In: Mason, R.E.A. (ed.) Information Processing 1983: Proc. IFIP 9th World Computer Congress, pp. 657–668 (1983)Google Scholar
  18. 18.
    Larus, J., Rajwar, R.: Transactional Memory. Morgan & Claypool (2007)Google Scholar
  19. 19.
    Manovit, C., Hangal, S., Chafi, H., McDonald, A., Kozyrakis, C., Olukotun, K.: Testing Implementations of Transactional Memory. In: Proceedings of the 15th international conference on Parallel architectures and compilation techniques (2007)Google Scholar
  20. 20.
    Moore, K.F., Grossman, D.: High-Level Small-Step Operational Semantics for Transactions. In: Proceedings of POPL 2008 (2008)Google Scholar
  21. 21.
    Peled, D.: Th. Wilke. Stutter-invariant temporal properties are expressible without the next-time operator. Information Processing Letters 63, 243–246 (1997)MathSciNetCrossRefMATHGoogle Scholar
  22. 22.
    Qadeer, S., Rajamani, S.K., Rehof, J.: Summarizing Procedures in Concurrent Programs. In: Proceedings of POPL 2004 (2004)Google Scholar
  23. 23.
    Ramalingam, G.: Context-sensitive synchronization-sensitive analysis is undecidable. ACM Trans. Program. Lang. Syst. 22(2), 416–430 (2000)CrossRefGoogle Scholar
  24. 24.
    Shavit, N., Touitou, D.: Software transactional memory. Distributed Computing 10(2), 99–116 (1997)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Kousha Etessami
    • 1
  • Patrice Godefroid
    • 2
  1. 1.University of EdinburghUK
  2. 2.Microsoft ResearchUSA

Personalised recommendations