Title :
Programming Support for Speculative Execution with Software Transactional Memory
Author :
Min Feng ; Gupta, Rajesh ; Neamtiu, Iulian
Author_Institution :
NEC Labs. America, Cupertino, CA, USA
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.
Keywords :
C++ language; cache storage; concurrency control; decision trees; parallel programming; program assemblers; program compilers; software libraries; software performance evaluation; C-C++; ITI decision tree constructor; Intel´s STM compiler; STAMP benchmarks; STM runtime libraries; Velvet genomic assembler; annotated code translation; compiler implementation performance; data race; irreversible functions; precompiled functions; programmability; programming constructs; redundant read-write barrier elimination; shared variable caching; software transactional memory; speculative execution overhead; speculatively-executed code; speculatively-executed code writing; write buffer; Benchmark testing; Cloning; Instruments; Libraries; Program processors; Programming; Writing; compiler; parallel programming; speculation;
Conference_Titel :
Parallel and Distributed Processing Symposium Workshops & PhD Forum (IPDPSW), 2013 IEEE 27th International
Conference_Location :
Cambridge, MA
Print_ISBN :
978-0-7695-4979-8
DOI :
10.1109/IPDPSW.2013.194