TY - GEN
T1 - Programming support for speculative execution with software transactional memory
AU - Feng, Min
AU - Gupta, Rajiv
AU - Neamtiu, Iulian
N1 - Copyright:
Copyright 2019 Elsevier B.V., All rights reserved.
PY - 2013
Y1 - 2013
N2 - 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.
AB - 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.
KW - compiler
KW - parallel programming
KW - speculation
UR - http://www.scopus.com/inward/record.url?scp=84899724774&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84899724774&partnerID=8YFLogxK
U2 - 10.1109/IPDPSW.2013.194
DO - 10.1109/IPDPSW.2013.194
M3 - Conference contribution
AN - SCOPUS:84899724774
SN - 9780769549798
T3 - Proceedings - IEEE 27th International Parallel and Distributed Processing Symposium Workshops and PhD Forum, IPDPSW 2013
SP - 394
EP - 403
BT - Proceedings - IEEE 27th International Parallel and Distributed Processing Symposium Workshops and PhD Forum, IPDPSW 2013
PB - IEEE Computer Society
T2 - 2013 IEEE 37th Annual Computer Software and Applications Conference, COMPSAC 2013
Y2 - 22 July 2013 through 26 July 2013
ER -