DocumentCode :
3457950
Title :
Adaptive Locks: Combining Transactions and Locks for Efficient Concurrency
Author :
Usui, Takayuki ; Behrends, Reimer ; Evans, Jacob ; Smaragdakis, Yannis
Author_Institution :
Dept. of Comput. & Inf. Sci., Univ. of Oregon, Eugene, OR, USA
fYear :
2009
fDate :
12-16 Sept. 2009
Firstpage :
3
Lastpage :
14
Abstract :
Transactional memory is being advanced as an alternative to traditional lock-based synchronization for concurrent programming. Transactional memory simplifies the programming model and maximizes concurrency. At the same time, transactions can suffer from interference that causes them to often abort, from heavy overheads for memory accesses, and from expressiveness limitations (e.g., for I/O operations). In this paper we propose an adaptive locking technique that dynamically observes whether a critical section would be best executed transactionally or while holding a mutex lock. The critical new elements of our approach include the adaptivity logic and cost-benefit analysis, a low overhead implementation of statistics collection and adaptive locking in a full C compiler, and an exposition of the effects on the programming model. In experiments with both micro and macro-benchmarks we found adaptive locks to consistently match or out perform the better of the two component mechanisms (mutexes or transactions). Compared to either mechanism alone, adaptive locks often provide 3-to-10x speedups. Additionally, adaptive locks simplify the programming model by reducing the need for fine-grained locking: with adaptive locks, the programmer can specify coarse-grained locking annotations and often achieve fine-grained locking performance due to the transactional memory mechanisms.
Keywords :
C language; cost-benefit analysis; program compilers; storage management; transaction processing; adaptive locks; adaptivity logic; coarse-grained locking annotations; concurrent programming; cost-benefit analysis; fine-grained locking; full C compiler; low- overhead implementation; memory accesses; mutex lock; transactional memory; Computer science; Concurrent computing; Information science; Interference; Jacobian matrices; Logic programming; Parallel architectures; Programming profession; System recovery; Yarn;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Parallel Architectures and Compilation Techniques, 2009. PACT '09. 18th International Conference on
Conference_Location :
Raleigh, NC
ISSN :
1089-795X
Print_ISBN :
978-0-7695-3771-9
Type :
conf
DOI :
10.1109/PACT.2009.20
Filename :
5260570
Link To Document :
بازگشت