The OpenTM Transactional Application Programming Interface

Transactional Memory (TM) simplifies parallel programming by supporting atomic and isolated execution of user-identified tasks. To date, TM programming has re quired the use of libraries that make it difficult to achieve scalable performance with code that is easy to develop and maintain. For TM programming to become practical, it is important to integrate TM into familiar, high-level environments for parallel programming. This paper presents OpenTM, an application programming interface (API) for parallel programming with transactions. OpenTM extends OpenMP, a widely used API for shared-memory parallel programming, with a set of compiler directives to express non-blocking synchronization and speculative parallelization based on memory transactions. We also present a portable OpenTM implementation that produces code for hardware, software, and hybrid TM systems. The implementation builds upon the OpenMP support in the GCC compiler and includes a runtime for the C programming language. We evaluate the performance and programmability features of OpenTM. We show that it delivers the performance of fine-grain locks at the programming simplicity of coarse- grain locks. Compared to transactional programming with lower-level interfaces, it removes the burden of manual annotations for accesses to shared variables and enables easy changes of the scheduling and contention management policies. Overall, OpenTM provides a practical and efficient TM programming environment within the familiar scope of OpenMP.

[1]  Kunle Olukotun,et al.  An effective hybrid transactional memory system with strong isolation guarantees , 2007, ISCA '07.

[2]  Sarita V. Adve,et al.  Shared Memory Consistency Models: A Tutorial , 1996, Computer.

[3]  Christopher J. Hughes,et al.  Hybrid transactional memory , 2006, PPoPP '06.

[4]  Timothy L. Harris,et al.  Exceptions and side-effects in atomic blocks , 2005, Sci. Comput. Program..

[5]  Maurice Herlihy,et al.  Transactional Memory: Architectural Support For Lock-free Data Structures , 1993, Proceedings of the 20th Annual International Symposium on Computer Architecture.

[6]  Bratin Saha,et al.  McRT-STM: a high performance software transactional memory system for a multi-core runtime , 2006, PPoPP '06.

[7]  Kunle Olukotun,et al.  Characterization of TCC on chip-multiprocessors , 2005, 14th International Conference on Parallel Architectures and Compilation Techniques (PACT'05).

[8]  Kunle Olukotun,et al.  The common case transactional behavior of multithreaded programs , 2006, The Twelfth International Symposium on High-Performance Computer Architecture, 2006..

[9]  Satish Narayanasamy,et al.  Unbounded page-based transactional memory , 2006, ASPLOS XII.

[10]  Keshav Pingali,et al.  Optimistic parallelism requires abstractions , 2009, CACM.

[11]  Rudolf Eigenmann,et al.  Cetus - An Extensible Compiler Infrastructure for Source-to-Source Transformation , 2003, LCPC.

[12]  David A. Wood,et al.  Performance Pathologies in Hardware Transactional Memory , 2007, IEEE Micro.

[13]  James R. Larus,et al.  Transactional Memory (Synthesis Lectures on Computer Architecture) , 2007 .

[14]  Eduard Ayguadé,et al.  Transactional Memory and OpenMP , 2007, IWOMP.

[15]  Brian T. Lewis,et al.  Compiler and runtime support for efficient software transactional memory , 2006, PLDI '06.

[16]  Bratin Saha,et al.  Code Generation and Optimization for Transactional Memory Constructs in an Unmanaged Language , 2007, International Symposium on Code Generation and Optimization (CGO'07).

[17]  Maurice Herlihy,et al.  Robust Contention Management in Software Transactional Memory , 2005, OOPSLA 2005.

[18]  Dan Grossman,et al.  Enforcing isolation and ordering in STM , 2007, PLDI '07.

[19]  Nir Shavit,et al.  Transactional Locking II , 2006, DISC.

[20]  James R. Larus,et al.  Transactional Memory , 2006, Transactional Memory.

[21]  William N. Scherer,et al.  Advanced contention management for dynamic software transactional memory , 2005, PODC '05.

[22]  Simon L. Peyton Jones,et al.  Composable memory transactions , 2005, CACM.

[23]  Quinn Jacobson,et al.  Architectural Support for Software Transactional Memory , 2006, 2006 39th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO'06).

[24]  C. Kozyrakis,et al.  Early Release : Friend or Foe ? , 2006 .

[25]  Bradley C. Kuszmaul,et al.  Unbounded Transactional Memory , 2005, HPCA.

[26]  Kunle Olukotun,et al.  The Atomos transactional programming language , 2006, PLDI '06.

[27]  Luis Ceze,et al.  Implicit parallelism with ordered transactions , 2007, PPoPP.

[28]  Keir Fraser,et al.  Language support for lightweight transactions , 2003, SIGP.

[29]  Kunle Olukotun,et al.  Tradeoffs in transactional memory virtualization , 2006, ASPLOS XII.

[30]  David A. Wood,et al.  LogTM: log-based transactional memory , 2006, The Twelfth International Symposium on High-Performance Computer Architecture, 2006..

[31]  A. McDonald,et al.  Architectural Semantics for Practical Transactional Memory , 2006, ISCA 2006.

[32]  D. Novillo OpenMP and automatic parallelization in GCC Diego , 2006 .