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.
- 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 Scholar
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- A. W. Appel. Simple generational garbage collection and fast allocation. Software Practice and Experience, 19(2), 1989. Google Scholar
Digital Library
- 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 Scholar
- P. Briggs, K. D. Cooper, and L. T. Simpson. Value numbering. Software---Practice and Experience, 27(6), June 1996. Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Cray Inc. Chapel Specification 0.4. http://chapel.cs.washington.edu/specification.pdf, 2005.Google Scholar
- R. Ennals. Software transactional memory should not be obstruction-free. http://www.cambridge.intel-research.net/~rennals/notlockfree.pdf, 2005.Google Scholar
- K. Fraser. Practical lock freedom. PhD thesis, Cambridge University Computer Laboratory, 2003. Technical Report UCAM-CL-TR-579.Google Scholar
- J. Gray and A. Reuter. Transaction Processing: Concepts and Techniques. Morgan Kaufmann, 1993. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- T. Harris and K. Fraser. Language support for lightweight transactions. In OOPSLA 2003: Object-Oriented Programing, Systems, Languages, and Applications. Google Scholar
Digital Library
- T. Harris, S. Marlow, S. Peyton-Jones, and M. Herlihy. Composable memory transactions. In PPoPP 2005: Principles and Practice of Parallel Programming. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- S. Kumar, M. Chu, C. Hughes, P. Kundu, and A. Nguyen. Hybrid Transactional Memory. In PPoPP 2006: Principles and Practice of Parallel Programming. Google Scholar
Digital Library
- H. T. Kung and J. T. Robinson. On optimistic methods for concurrency control. ACM Trans. Database Syst., 6(2), 1981. Google Scholar
Digital Library
- J. Manson, W. Pugh, and S. V. Adve. The Java memory model. In POPL 2005: Principles of Programming Languages. Google Scholar
Digital Library
- V. Marathe, W. Scherer, and M. Scott. Adaptive software transactional memory. Technical Report Technical Report 868, University of Rochester, 2005.Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- M. Moir. Hybrid hardware/software transactional memory. http://www.cs.wisc.edu/rajwar/tm-workshop/TALKS/moir.pdf, 2005.Google Scholar
- 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 Scholar
- 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 Scholar
- 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 Scholar
Digital Library
- R. Rajwar and J. R. Goodman. Speculative lock elision: enabling highly concurrent multithreaded execution. In MICRO 34: International Symposium on Microarchitecture, 2001. Google Scholar
Digital Library
- R. Rajwar, M. Herlihy, and K. Lai. Virtualizing transactional memory. In ISCA 2005: International Symposium on Computer Architecture. Google Scholar
Digital Library
- M. F. Ringenburg and D. Grossman. AtomCaml: first-class atomicity via rollback. In ICFP 2005: International Conference on Functional Programming. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- N. Shavit and D. Touitou. Software transactional memory. In PODC 1995: Principles of Distributed Computing. Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
- 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 Scholar
Digital Library
Index Terms
Compiler and runtime support for efficient software transactional memory
Recommendations
Compiler and runtime support for efficient software transactional memory
Proceedings of the 2006 PLDI ConferenceProgrammers 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 ...
Enforcing isolation and ordering in STM
Proceedings of the 2007 PLDI conferenceTransactional memory provides a new concurrency control mechanism that avoids many of the pitfalls of lock-based synchronization. High-performance software transactional memory (STM) implementations thus far provide weak atomicity: Accessing shared data ...
Transactional memory: from semantics to silicon
IWMSE '08: Proceedings of the 1st international workshop on Multicore software engineeringMulti-core architectures bring parallel programming into the mainstream. Parallel programming poses many new challenges to the developer, one of which is synchronizing concurrent access to shared memory by multiple threads. Programmers have ...







Comments