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

  • Authors:
  • Yang Ni;Adam Welc;Ali-Reza Adl-Tabatabai;Moshe Bach;Sion Berkowits;James Cownie;Robert Geva;Sergey Kozhukow;Ravi Narayanaswamy;Jeffrey Olivier;Serguei Preis;Bratin Saha;Ady Tal;Xinmin Tian

  • Affiliations:
  • Intel Corporation, Santa Clara, CA, USA;Intel Corporation, Santa Clara, CA, USA;Intel Corporation, Santa Clara, CA, USA;Intel Corporation, Haifa, Israel;Intel Corporation, Haifa, Israel;Intel Corporation, Glasgow, United Kingdom;Intel Corporation, Santa Clara, CA, USA;Intel Corporation, Novosibirsk, Russian Fed.;Intel Corporation, Santa Clara, CA, USA;Intel Corporation, Champaign, IL, USA;Intel Coporation, Novosibirsk, Russian Fed.;Intel Corporation, Santa Clara, CA, USA;Intel Corporation, Haifa, Israel;Intel Corporation, Santa Clara, CA, USA

  • Venue:
  • Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications
  • Year:
  • 2008

Quantified Score

Hi-index 0.02

Visualization

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.