Lock Elision for Read-Only Critical Sections in Java']Java

被引:1
作者
Nakaike, Takuya [1 ]
Michael, Maged M. [1 ]
机构
[1] IBM Res Tokyo, Tokyo, Japan
关键词
Algorithms; Languages; Performance; !text type='Java']Java[!/text; Just-In-Time compiler; synchronization; monitor; lock; optimization; lock elision;
D O I
10.1145/1809028.1806627
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
It is not uncommon in parallel workloads to encounter shared data structures with read-mostly access patterns, where operations that update data are infrequent and most operations are read-only. Typically, data consistency is guaranteed using mutual exclusion or read-write locks. The cost of atomic update of lock variables result in high overheads and high cache coherence traffic under active sharing, thus slowing down single thread performance and limiting scalability. In this paper, we present SOLERO (Software Optimistic Lock Elision for Read-Only critical sections), a new lock implementation called for optimizing read-only critical sections in Java based on sequential locks. SOLERO is compatible with the conventional lock implementation of Java. However, unlike the conventional implementation, only critical sections that may write data or have side effects need to update lock variables, while read-only critical sections need only read lock variables without writing them. Each writing critical section changes the lock value to a new value. Hence, a read-only critical section is guaranteed to be consistent if the lock is free and its value does not change from the beginning to the end of the read-only critical section. Using Java workloads including SPECjbb2005 and the HashMap and TreeMap Java classes, we evaluate the performance impact of applying SOLERO to read-mostly locks. Our experimental results show performance improvements across the board, often substantial, in both single thread speed and scalability over the conventional lock implementation (mutual exclusion) and read-write locks. SOLERO improves the performance of SPECjbb2005 by 3-5% on single and multiple threads. The results using the HashMap and TreeMap benchmarks show that SOLERO outperforms the conventional lock implementation and read-write locks by substantial multiples on multi-threads.
引用
收藏
页码:269 / 278
页数:10
相关论文
共 17 条
[1]  
[Anonymous], Specjbb2005
[2]  
BACON D.F., 1998, PLDI 98, P258
[3]  
BLACKBURN SM, 2006, OOPSLA 06, P169
[4]   CONCURRENT CONTROL WITH READERS AND WRITERS [J].
COURTOIS, PJ ;
HEYMANS, F ;
PARNAS, DL .
COMMUNICATIONS OF THE ACM, 1971, 14 (10) :667-&
[5]  
CRUMMEY JM, 1991, PPOPP 91, P106
[6]  
Dice David, 2009, P 14 INT C ARCHITECT, P157, DOI [DOI 10.1145/1508244.1508263, DOI 10.1145/1508284.1508263]
[7]   SOLUTION OF A PROBLEM IN CONCURRENT PROGRAMMING CONTROL [J].
DIJKSTRA, EW .
COMMUNICATIONS OF THE ACM, 1965, 8 (09) :569-&
[8]   Java']Java server performance: A case study of building efficient, scalable Jvms [J].
Dimpsey, R ;
Arora, R ;
Kulper, K .
IBM SYSTEMS JOURNAL, 2000, 39 (01) :151-174
[9]   Lock reservation: Java']Java locks can mostly do without atomic operations [J].
Kawachiya, K ;
Koseki, A ;
Onodera, T .
ACM SIGPLAN NOTICES, 2002, 37 (11) :130-141
[10]  
Manson Jeremy., 2005, Proceedings of the 32Nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL'05, P378, DOI DOI 10.1145/1040305.1040336