Programming support for speculative execution with software transactional memory

Min Feng, Rajiv Gupta, Iulian Neamtiu

Research output: Chapter in Book/Report/Conference proceedingConference contribution

3 Scopus citations

Abstract

In this paper, we identify the practical issues that deter the adoption of software transactional memory (STM) for speculation in real applications. These issues include dealing with excessive instrumentation added by naive identification of potential shared accesses, functions that may be called from both transactional and non-transactional contexts, and calls to functions for which the source is unavailable. We address these challenges and provide an approach for developing speculatively-executed code in C/C++ that offers superior programmability and performance. Our contributions consist of a set of programming constructs for writing speculatively-executed code and a compiler that translates code annotated with these constructs into speculatively- executable code that uses STM runtime libraries. Our approach uses annotations that simply mark the boundaries of the code that is to be executed speculatively and supports calling precompiled (e.g., C standard library) and irreversible (e.g., I/O operations and system calls) functions from within transactions. We employ a series of important optimizations for reducing the overhead of speculative execution, including: placement of read/write barriers only for accesses that actually can cause a data race; elimination of redundant read/write barriers by caching shared variables; and eliminating unnecessary search in the write buffer. We evaluate the programmability of our constructs and the performance of our compiler implementation using eight STAMP benchmarks and two real applications-The Velvet genomic assembler and the ITI decision tree constructor. Compared to Intel's STM compiler, our approach requires 91% fewer constructs to be inserted by the programmer, yet it achieves 20.8% better performance.

Original languageEnglish (US)
Title of host publicationProceedings - IEEE 27th International Parallel and Distributed Processing Symposium Workshops and PhD Forum, IPDPSW 2013
PublisherIEEE Computer Society
Pages394-403
Number of pages10
ISBN (Print)9780769549798
DOIs
StatePublished - 2013
Externally publishedYes
Event2013 IEEE 37th Annual Computer Software and Applications Conference, COMPSAC 2013 - Boston, MA, Japan
Duration: Jul 22 2013Jul 26 2013

Publication series

NameProceedings - IEEE 27th International Parallel and Distributed Processing Symposium Workshops and PhD Forum, IPDPSW 2013

Conference

Conference2013 IEEE 37th Annual Computer Software and Applications Conference, COMPSAC 2013
CountryJapan
CityBoston, MA
Period7/22/137/26/13

All Science Journal Classification (ASJC) codes

  • Computational Theory and Mathematics
  • Software
  • Theoretical Computer Science

Keywords

  • compiler
  • parallel programming
  • speculation

Fingerprint Dive into the research topics of 'Programming support for speculative execution with software transactional memory'. Together they form a unique fingerprint.

Cite this