Advertisement

A Composable Mixed Mode Concurrency Control Semantics for Transactional Programs

  • Granville Barnett
  • Shengchao Qin
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7635)

Abstract

Most software transactional memories employ optimistic concurrency control. A pessimistic semantics, however, is not without its benefits: its programming model is often much simpler to reason about and supports the execution of irreversible operations. We present a programming model that supports both optimistic and pessimistic concurrency control semantics. Our pessimistic transactions, guaranteed transactions (gatomics), afford a stronger semantics than that typically employed by pessimistic transactions by guaranteeing run once execution and safe encapsulation of the privatisation and publication idioms. We describe our mixed mode transactional programming language by giving a small step operational semantics. Using our semantics and their derived schedules of actions (reads and writes) we show that conflicting transactions (atomics) and gatomics are serialisable. We then go on to define schedules of actions in the form of Java’s memory model (JMM) and show that the same properties that held under our restrictive memory model also hold under our modified JMM.

Keywords

Memory Model Operational Semantic Concurrency Control Sequential Consistency Software Transactional Memory 
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: Principles of Programming Languages (2008)Google Scholar
  2. 2.
    Adve, S.V., Gharachorloo, K.: Shared memory consistency models: A tutorial. Computer (1996)Google Scholar
  3. 3.
    Adve, S.V., Hill, M.D.: Weak ordering – a new definition. In: International Symposium on Computer Architecture (1990)Google Scholar
  4. 4.
    Agrawal, R., Carey, M.J., Livny, M.: Concurrency control performance modeling: alternatives and implications. ACM Trans. Database Syst. (1987)Google Scholar
  5. 5.
    Andersen, L.O.: Program analysis and specialization for the c programming language. Technical report. University of Copenhagen (1994)Google Scholar
  6. 6.
    Blundell, C., Christopher Lewis, E., Martin, M.M.K.: Deconstructing transactional semantics: The subtleties of atomicity. In: Workshop on Duplicating, Deconstructing, and Debunking (2005)Google Scholar
  7. 7.
    Blundell, C., Devietti, J., Christopher Lewis, E., Martin, M.M.K.: Making the fast case common and the uncommon case simple in unbounded transactional memory. In: International Symposium on Computer Architecture (2007)Google Scholar
  8. 8.
    Gray, J.: The transaction concept: virtues and limitations. Very Large Data Bases (1981)Google Scholar
  9. 9.
    Grossman, D., Manson, J., Pugh, W.: What do high-level memory models mean for transactions? In: Memory System Performance and Correctness (2006)Google Scholar
  10. 10.
    Harris, T., Marlow, S., Peyton-Jones, S., Herlihy, M.: Composable memory transactions. In: Principles and Practice of Parallel Programming (2005)Google Scholar
  11. 11.
    Harris, T., Larus, J., Rajwar, R.: Transactional memory, 2nd edn. (2010)Google Scholar
  12. 12.
    Herlihy, M., Luchangco, V., Moir, M., Scherer III, W.N.: Software transactional memory for dynamic-sized data structures. In: Principles of Distributed Computing (2003)Google Scholar
  13. 13.
    Hickey, R.: The clojure programming language. In: Dynamic Languages Symposium (2008)Google Scholar
  14. 14.
    Isard, M., Birrell, A.: Automatic mutual exclusion. In: USENIX (2007)Google Scholar
  15. 15.
    Jenista, J., Demsky, B.: Disjointness analysis for java-like languages. Technical report, University of California, Irvine (2009)Google Scholar
  16. 16.
    Koskinen, E., Parkinson, M., Herlihy, M.: Coarse-grained transactions. In: Principles of Programming Languages (2010)Google Scholar
  17. 17.
    Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. Transactions on Computers (1979)Google Scholar
  18. 18.
    Lamport, L.: Time, clocks, and the ordering of events in a distributed system. Commun. ACM (1978)Google Scholar
  19. 19.
    Manson, J., Pugh, W., Adve, S.V.: The java memory model. In: Principles of Programming Languages (2005)Google Scholar
  20. 20.
    Marron, M., Méndez-Lojo, M., Hermenegildo, M., Stefanovic, D., Kapur, D.: Sharing analysis of arrays, collections, and recursive structures. In: Program Analysis for Software Tools and Engineering (2008)Google Scholar
  21. 21.
    McCloskey, B., Zhou, F., Gay, D., Brewer, E.: Autolocker: synchronization inference for atomic sections. In: Principles of Programming Languages (2006)Google Scholar
  22. 22.
    Menon, V., Balensiefer, S., Shpeisman, T., Adl-Tabatabai, A.-R., Hudson, R.L., Saha, B., Welc, A.: Practical weak-atomicity semantics for java stm. In: Symposium on Parallelism in Algorithms and Architectures (2008)Google Scholar
  23. 23.
    Ni, Y., Welc, A., Adl-Tabatabai, A.-R., Bach, M., Berkowits, S., Cownie, J., Geva, R., Kozhukow, S., Narayanaswamy, R., Olivier, J., Preis, S., Saha, B., Tal, A., Tian, X.: Design and implementation of transactional constructs for c/c++. In: Object-Oriented Programming Systems Languages and Applications (2008)Google Scholar
  24. 24.
    Papadimitriou, C.H.: The serializability of concurrent database updates. J. ACM (1979)Google Scholar
  25. 25.
    Pugh, W., Wonnacott, D.: Constraint-based array dependence analysis. Transactions on Programming Languages and Systems (1998)Google Scholar
  26. 26.
    Shavit, N., Matveev, A.: Towards a fully pessimistic stm model. Transactional Computing (2012)Google Scholar
  27. 27.
    Shavit, N., Touitou, D.: Software transactional memory. In: Principles of Distributed Computing (1995)Google Scholar
  28. 28.
    Smaragdakis, Y., Kay, A., Behrends, R., Young, M.: Transactions with isolation and cooperation. In: Object-Oriented Programming Systems Languages and Applications (2007)Google Scholar
  29. 29.
    Sonmez, N., Harris, T., Cristal, A., Unsal, O.S., Valero, M.: Taking the heat off transactions: Dynamic selection of pessimistic concurrency control. In: International Symposium on Parallel and Distributed Processing (2009)Google Scholar
  30. 30.
    Spear, M.F., Marathe, V.J., Daless, L., Scott, M.L.: Privatization techniques for software transactional memory. In: Principles of Distributed Computing (2007)Google Scholar
  31. 31.
    Welc, A., Saha, B., Adl-Tabatabai, A.-R.: Irrevocable transactions and their applications. In: Symposium on Parallelism in Algorithms and Architectures (2008)Google Scholar
  32. 32.
    Ziarek, L., Welc, A., Adl-Tabatabai, A.-R., Menon, V., Shpeisman, T., Jagannathan, S.: A Uniform Transactional Execution Environment for Java. In: Dell’Acqua, P. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 129–154. Springer, Heidelberg (2008)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Granville Barnett
    • 1
  • Shengchao Qin
    • 2
    • 3
  1. 1.School of Engineering and Computing SciencesDurham UniversityUK
  2. 2.School of ComputingTeesside UniversityUK
  3. 3.State Key Lab. for Novel Software TechnologyNanjing UniversityUK

Personalised recommendations