skip to main content
10.1145/1133981.1133985acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article

Compiler and runtime support for efficient software transactional memory

Published:11 June 2006Publication History

ABSTRACT

Programmers have traditionally used locks to synchronize concurrent access to shared data. Lock-based synchronization, however, has well-known pitfalls: using locks for fine-grain synchronization and composing code that already uses locks are both difficult and prone to deadlock. Transactional memory provides an alternate concurrency control mechanism that avoids these pitfalls and significantly eases concurrent programming. Transactional memory language constructs have recently been proposed as extensions to existing languages or included in new concurrent language specifications, opening the door for new compiler optimizations that target the overheads of transactional memory.This paper presents compiler and runtime optimizations for transactional memory language constructs. We present a high-performance software transactional memory system (STM) integrated into a managed runtime environment. Our system efficiently implements nested transactions that support both composition of transactions and partial roll back. Our JIT compiler is the first to optimize the overheads of STM, and we show novel techniques for enabling JIT optimizations on STM operations. We measure the performance of our optimizations on a 16-way SMP running multi-threaded transactional workloads. Our results show that these techniques enable transactional memory's performance to compete with that of well-tuned synchronization.

References

  1. A.-R. Adl-Tabatabai, J. Bharadwaj, D.-Y. Chen, A. Ghuloum, V. S. Menon, B. R. Murphy, M. Serrano, and T. Shpeisman. The StarJIT compiler: a dynamic compiler for managed runtime environments. Intel Technology Journal, 7(1), February 2003.Google ScholarGoogle Scholar
  2. E. Allen, D. Chase, V. Luchangco, J.-W. Maessen, S. Ryu, G. L. S. Jr., and S. Tobin-Hochstadt. The Fortress language specification version 0.707. http://research.sun.com/projects/plrg/fortress0707.pdf, 2005.Google ScholarGoogle Scholar
  3. C. S. Ananian, K. Asanovic, B. C. Kuszmaul, C. E. Leiserson, and S. Lie. Unbounded transactional memory. In HPCA 2005: High-Performance Computer Architecture. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. S. Ananian and M. Rinard. Efficient object-based software transactions. In OOPSLA 2005 Workshop on Synchronization and Concurrency in Object-Oriented Languages (SCOOL).Google ScholarGoogle Scholar
  5. A. W. Appel. Simple generational garbage collection and fast allocation. Software Practice and Experience, 19(2), 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Blundell, E. C. Lewis, and M. M. K. Martin. Deconstructing transactions: The subtleties of atomicity. In Fourth Annual Workshop on Duplicating, Deconstructing, and Debunking. Jun 2005.Google ScholarGoogle Scholar
  7. P. Briggs, K. D. Cooper, and L. T. Simpson. Value numbering. Software---Practice and Experience, 27(6), June 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. B. D. Carlstrom, J. Chung, H. Chafi, A. McDonald, C. C. Minh, L. Hammond, C. Kozyrakis, and K. Olukotun. Transactional execution of Java programs. In OOPSLA 2005 Workshop on Synchronization and Concurrency in Object-Oriented Languages (SCOOL).Google ScholarGoogle Scholar
  9. P. Charles, C. Donawa, K. Ebcioglu, C. Grothoff, A. Kielstra, C. von Praun, V. Saraswat, and V. Sarakar. X10: an object-oriented approach to non-uniform cluster computing. In OOPSLA 2005: Object-Oriented Programing, Systems, Languages, and Applications. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Cierniak, M. Eng, N. Glew, B. Lewis, and J. Stichnoth. Open Runtime Platform: A Flexible High-Performance Managed Runtime Environment. Intel Technology Journal, 7(1), February 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Cray Inc. Chapel Specification 0.4. http://chapel.cs.washington.edu/specification.pdf, 2005.Google ScholarGoogle Scholar
  12. R. Ennals. Software transactional memory should not be obstruction-free. http://www.cambridge.intel-research.net/~rennals/notlockfree.pdf, 2005.Google ScholarGoogle Scholar
  13. K. Fraser. Practical lock freedom. PhD thesis, Cambridge University Computer Laboratory, 2003. Technical Report UCAM-CL-TR-579.Google ScholarGoogle Scholar
  14. J. Gray and A. Reuter. Transaction Processing: Concepts and Techniques. Morgan Kaufmann, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. L. Hammond, B. D. Carlstrom, V. Wong, B. Hertzberg, M. Chen, C. Kozyrakis, and K. Olukotun. Programming with transactional coherence and consistency (TCC). In ASPLOS-XI: Architectural Support for Programming Languages and Operating Systems, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. T. Harris and K. Fraser. Language support for lightweight transactions. In OOPSLA 2003: Object-Oriented Programing, Systems, Languages, and Applications. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. T. Harris, S. Marlow, S. Peyton-Jones, and M. Herlihy. Composable memory transactions. In PPoPP 2005: Principles and Practice of Parallel Programming. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. Herlihy, V. Luchangco, M. Moir, and I. William N. Scherer. Software transactional memory for dynamic-sized data structures. In PODC 2003: Principles of Distributed Computing. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Herlihy and J. E. B. Moss. Transactional memory: architectural support for lock-free data structures. In ISCA 1993: International Symposium on Computer Architecture. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. W. N. S. III and M. L. Scott. Contention management in dynamic software transactional memory. In PODC 2004 Workshop on Concurrency and Synchronization in Java programs.Google ScholarGoogle Scholar
  21. S. Kumar, M. Chu, C. Hughes, P. Kundu, and A. Nguyen. Hybrid Transactional Memory. In PPoPP 2006: Principles and Practice of Parallel Programming. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. H. T. Kung and J. T. Robinson. On optimistic methods for concurrency control. ACM Trans. Database Syst., 6(2), 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. J. Manson, W. Pugh, and S. V. Adve. The Java memory model. In POPL 2005: Principles of Programming Languages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. V. Marathe, W. Scherer, and M. Scott. Adaptive software transactional memory. Technical Report Technical Report 868, University of Rochester, 2005.Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. V. J. Marathe, W. N. Scherer, and M. L. Scott. Design tradeoffs in modern software transactional memory systems. In LCR 2004: Languages, Compilers, and Run-time Support for Scalable Systems. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. V. S. Menon, N. Glew, B. R. Murphy, A. McCreight, T. Shpeisman, A.-R. Adl-Tabatabai, and L. Petersen. A verifiable SSA program representation for aggressive compiler optimization. In POPL 2006: Principles of Programming Languages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. M. Moir. Hybrid hardware/software transactional memory. http://www.cs.wisc.edu/rajwar/tm-workshop/TALKS/moir.pdf, 2005.Google ScholarGoogle Scholar
  28. K. E. Moore, J. Bobba, M. J. Moravan, M. D. Hill, and D. A. Wood. LogTM: Log-based transactional memory. In HPCA 2006: High-Performance Computer Architecture.Google ScholarGoogle Scholar
  29. J. E. B. Moss and A. L. Hosking. Nested transactional memory: model and preliminary architecture sketches. In OOPSLA 2005 Workshop on Synchronization and Concurrency in Object-Oriented Languages (SCOOL).Google ScholarGoogle Scholar
  30. N. Nystrom, M. R. Clarkson, and A. C. Myers. Polyglot: an extensible compiler framework for Java. In CC 2005: International Conference on Compiler Construction, Lecture Notes in Computer Science 2622. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. R. Rajwar and J. R. Goodman. Speculative lock elision: enabling highly concurrent multithreaded execution. In MICRO 34: International Symposium on Microarchitecture, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. R. Rajwar, M. Herlihy, and K. Lai. Virtualizing transactional memory. In ISCA 2005: International Symposium on Computer Architecture. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. M. F. Ringenburg and D. Grossman. AtomCaml: first-class atomicity via rollback. In ICFP 2005: International Conference on Functional Programming. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. 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: Principles and Practice of Parallel Programming. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. N. Shavit and D. Touitou. Software transactional memory. In PODC 1995: Principles of Distributed Computing. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. A. Shinnar, D. Tarditi, M. Plesko, and B. Steensgaard. Integrating support for undo with exception handling. Technical Report MSR-TR-2004-140, Microsoft Research, December 2004.Google ScholarGoogle Scholar
  37. A. Welc, S. Jagannathan, and A. L. Hosking. Transactional monitors for concurrent objects. In ECOOP 2004: European Conference on Object-Oriented Programming, volume 3086 of Lecture Notes in Computer Science. Springer-Verlag.Google ScholarGoogle Scholar
  38. A. Welc, S. Jagannathan, and A. L. Hosking. Revocation techniques for Java concurrency. In Concurrency and Computation: Practice and Experience. John Wiley and Sons, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Compiler and runtime support for efficient software transactional memory

    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!