Adaptive Locks: Combining Transactions and Locks for Efficient Concurrency

被引:10
作者
Usui, Takayuki [1 ]
Behrends, Reimer [1 ]
Evans, Jacob [2 ]
Smaragdakis, Yannis [2 ]
机构
[1] Univ Oregon, Dept Comp & Informat Sci, Eugene, OR 97403 USA
[2] Univ Massachusetts, Dept Comp Sci, Amherst, MA 01003 USA
来源
18TH INTERNATIONAL CONFERENCE ON PARALLEL ARCHITECTURES AND COMPILATION TECHNIQUES, PROCEEDINGS | 2009年
基金
美国国家科学基金会;
关键词
MEMORY;
D O I
10.1109/PACT.2009.20
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
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 front expressiveness limitations (e.g., for I/O operations). fit 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 outperform 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.
引用
收藏
页码:3 / +
页数:3
相关论文
共 31 条
  • [1] ABADI M, 2009, COMPILER CONSTRUCTIO
  • [2] [Anonymous], OOPSLA
  • [3] Subtleties of transactional memory atomicity semantics
    Department of Computer and Information Science, University of Pennsylvania, Philadelphia, PA, United States
    [J]. IEEE Comput. Archit. Lett., 2006, 2
  • [4] BLUNDELL C, 2006, CIS0609 U PENSS
  • [5] A parameterized type system for race-free Java']Java programs
    Boyapati, C
    Rinard, M
    [J]. ACM SIGPLAN NOTICES, 2001, 36 (11) : 56 - 69
  • [6] Cao Minh C., 2008, IISWC 08
  • [7] Software Transactional Memory: Why is it Only a Research Toy?
    Cascaval, Calin
    Blundell, Colin
    Michael, Maged
    Cain, Harold W.
    Wu, Peng
    Chiras, Stefanie
    Chatterjee, Siddhartha
    [J]. COMMUNICATIONS OF THE ACM, 2008, 51 (11) : 40 - 46
  • [8] CHEREM S, 2008, SIGPLAN C PROGR LANG, P304
  • [9] DICE D, 2006, LECT NOTES COMPUTER, V4167
  • [10] DINIZ PC, 1997, SIGPLAN C PROGR LANG, P71