skip to main content
10.1145/1449764.1449780acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Design and implementation of transactional constructs for C/C++

Authors Info & Claims
Published:19 October 2008Publication History

ABSTRACT

This paper presents a software transactional memory system that introduces first-class C++ language constructs for transactional programming. We describe new C++ language extensions, a production-quality optimizing C++ compiler that translates and optimizes these extensions, and a high-performance STM runtime library. The transactional language constructs support C++ language features including classes, inheritance, virtual functions, exception handling, and templates. The compiler automatically instruments the program for transactional execution and optimizes TM overheads. The runtime library implements multiple execution modes and implements a novel STM algorithm that supports both optimistic and pessimistic concurrency control. The runtime switches a transaction's execution mode dynamically to improve performance and to handle calls to precompiled functions and I/O libraries. We present experimental results on 8 cores (two quad-core CPUs) running a set of 20 non-trivial parallel programs. Our measurements show that our system scales well as the numbers of cores increases and that our compiler and runtime optimizations improve scalability.

References

  1. M. Abadi, A. Birrell, T. Harris, and M. Isard. Semantics of transactional memory and automatic mutual exclusion. In POPL 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A.-R. Adl-Tabatabai, B. T. Lewis, V. S. Menon, B. R. Murphy, B. Saha, and T. Shpeisman. Compiler and runtime support for efficient software transactional memory. In PLDI 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. W. Baek, C. C. Minh, M. Trautmann, C. Kozyrakis, and K. Olukotun. The OpenTM transactional application programming interface. In PACT 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. Bienia, S. Kumar, J. Singh, and K. Li. The parsec benchmark suite: Characterization and architectural implications. Technical Report 811-08, Princeton University, 2008.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. C. Blundell, E. C. Lewis, and M. Martin. Subtleties of transactional memory atomicity semantics. Computer Architecture Letters, 5(2), Nov. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Blundell, E. C. Lewis, and M. Martin. Unrestricted transactional memory: Supporting I/O and system calls within transactions. Technical Report CIS-06-09, University of Pennsylvania, Department of Comp. and Info. Science, 2006.Google ScholarGoogle Scholar
  7. J. Bobba, K. E. Moore, L. Yen, H. Volos, M. D. Hill, M. M. Swift, and D. A.Wood. Performance pathologies in hardware transactional memory. In ISCA 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. H. J. Boehm and S. Adve. Foundations of the C++ concurrency memory model. In PLDI 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. C. Cao Minh, M. Trautmann, J. Chung, A. McDonald, N. Bronson, J. Casper, C. Kozyrakis, and K. Olukotun. An effective hybrid transactional memory system with strong isolation guarantees. In ISCA 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. L. Crowl, Y. Lev, V. Luchangco, M. Moir, and D. Nussbaum. Integrating transactional memory into C++. In TRANSACT 2007.Google ScholarGoogle Scholar
  11. L. Dalessandro, V. J. Marathe, M. F. Spear, and M. L. Scott. Capabilities and limitations of library-based software transactional memory in C++. In TRANSACT 2007.Google ScholarGoogle Scholar
  12. P. Damron, A. Fedorova, Y. Lev, V. Luchangco, M. Moir, and D. Nussbaum. Hybrid transactional memory. In ASPLOS 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. D. Dice, O. Shalev, and N. Shavit. Transactional locking II. In DISC 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. R. Ennals. Software transactional memory should not be obstruction-free. http://www.cambridge.intel-research.net/rennals/notlockfree.pdf, 2005.Google ScholarGoogle Scholar
  15. P. Felber, C. Fetzer, U. Müller, T. Riegel, M. Süβkraut, and H. Sturzrehm. Transactifying applications using an open compiler framework. In TRANSACT 2007.Google ScholarGoogle Scholar
  16. J. Gottschlich and D. A. Connors. DracoSTM: A practical C++ approach to software transactional memory. In LCSD 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. J. Gray and A. Reuter. Transaction Processing: Concepts and Techniques. Morgan Kaufmann, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. D. Grossman, J. Manson, and W. Pugh. What do high-level memory models mean for transactions? In MSPC 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. R. Guerraoui, M. Herlihy, M. Kapalka, and B. Pochon. Robust contention management in software transactional memory. In SCOOL 2005.Google ScholarGoogle Scholar
  20. T. Harris and K. Fraser. Language support for lightweight transactions. In OOPSLA 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. T. Harris, S. Marlow, S. P. Jones, and M. Herlihy. Composable memory transactions. In PPoPP 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. T. Harris, M. Plesko, A. Shinnar, and D. Tarditi. Optimizing memory transactions. In PLDI 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. Herlihy and E. Koskinen. Transactional boosting: a methodology for highly-concurrent transactional objects. In PPoPP 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. M. Herlihy, V. Luchangco, M. Moir, and I. William N. Scherer. Software transactional memory for dynamicsized data structures. In PODC 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Herlihy, V. Luchangco, and M. Moir. A flexible framework for implementing software transactional memory. In OOPSLA 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. B. Hindman and D. Grossman. Atomicity via source-to source translation. In MSPC 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. R. L. Hudson, B. Saha, A.-R. Adl-Tabatabai, and B. C. Hertzberg. McRT-Malloc: A scalable transactional memory allocator. In ISMM 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. IBM. IBM C/C++ for Transactional Memory, for AIX, V0.9, Language Extensions and User's Guide. http://dl.alphaworks.ibm.com/technologies/xlcstm/xlcstmwhitepaper.pdf.Google ScholarGoogle Scholar
  29. Y. Lev, M. Moir, and D. Nussbaum. PhTM: Phased transactional memory. In TRANSACT 2007.Google ScholarGoogle Scholar
  30. J. Manson, W. Pugh, and S. V. Adve. The Java memory model. In POPL 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. V. J. Marathe, M. F. Spear, C. Heriot, A. Acharya, D. Eisenstat, I. William N. Scherer, and M. L. Scott. Lowering the overhead of software transactional memory. In TRANSACT 2006.Google ScholarGoogle Scholar
  32. P. McGachey, A.-R. Adl-Tabatabai, R. L. Hudson, V. Menon, B. Saha, and T. Shpeisman. Concurrent GC leveraging transactional memory. In PPoPP 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. V. Menon, S. Balensiefer, T. Shpeisman, A.-R. Adl-Tabatabai, R. L. Hudson, B. Saha, and A.Welc. Practical weak-atomicity semantics for Java STM. In SPAA 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. V. Menon, S. Balensiefer, T. Shpeisman, A.-R. Adl-Tabatabai, R. L. Hudson, B. Saha, and A. Welc. Single global lock semantics in a weakly atomic STM. In TRANSACT 2008.Google ScholarGoogle Scholar
  35. M. Milovanović, R. Ferrer, V. Gajinov, O. S. Unsal, A. Cristal, E. Ayguadé, and M. Valero. Multithreaded software transactional memory and OpenMP. In MEDEA 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. K. F. Moore and D. Grossman. High-level small-step operational semantics for transactions. In POPL 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. J. E. B. Moss and A. L. Hosking. Nested transactional memory: model and preliminary architecture sketches. In SCOOL 2005.Google ScholarGoogle Scholar
  38. Y. Ni, V. Menon, A.-R. Adl-Tabatabai, A. L. Hosking, R. L. Hudson, J. E. B. Moss, B. Saha, and T. Shpeisman. Open nesting in software transactional memory. In PPoPP 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. M. F. Ringenburg and D. Grossman. AtomCaml: first-class atomicity via rollback. In ICFP 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. B. Saha, A.-R. Adl-Tabatabai, R. Hudson, C. C. Minh, and B. Hertzberg. McRT-STM: A high performance software transactional memory system for a multi-core runtime. In PPoPP 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. B. Saha, A.-R. Adl-Tabatabai, and Q. Jacobson. Architectural support for software transactional memory. In MICRO 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. T. Shpeisman, V. Menon, A.-R. Adl-Tabatabai, S. Balensiefer, D. Grossman, R. L. Hudson, K. F. Moore, and S. Bratin. Enforcing isolation and ordering in STM. In PLDI 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. A. Shriraman, V. J. Marathe, S. Dwarkadas, M. L. Scott, D. Eisenstata, C. Heriot, I. William N. Scherer, and M. F. Spear. Hardware acceleration of software transactional memory. In TRANSACT 2006.Google ScholarGoogle Scholar
  44. M. Spear, M. Michael, and M. Scott. Inevitability mechanisms for software transactional memory. In TRANSACT 2008.Google ScholarGoogle Scholar
  45. M. F. Spear, V. J. Marathe, L. Dalessandro, and M. L. Scott. Privatization techniques for software transactional memory. Technical Report 915, University of Rochester, Computer Science Dept., 2007.Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. C. Wang, W.-Y. Chen, Y. Wu, B. Saha, and A.-R. Adl-Tabatabai. Code generation and optimization for transactional memory constructs in an unmanaged language. In CGO 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. A. Welc, A. L. Hosking, and S. Jagannathan. Transparently reconciling transactions with locking for Java synchronization. In ECOOP 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. A. Welc, B. Saha, and A.-R. Adl-Tabatabai. Irrevocable transactions and their applications. In SPAA 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. I. William N. Scherer and M. L. Scott. Advanced contention management for dynamic software transactional memory. In PODC 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. I. William N. Scherer and M. L. Scott. Contention management in dynamic software transactional memory. In CSJP 2004.Google ScholarGoogle Scholar
  51. S. C.Woo, M. Ohara, E. Torrie, J. P. Singh, and A. Gupta. The SPLASH-2 programs: Characterization and methodological considerations. In ISCA 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Design and implementation of transactional constructs for C/C++

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!