Performance of memory reclamation for lockless synchronization

被引:93
作者
Hart, Thomas E. [1 ]
McKenney, Paul E. [2 ]
Brown, Angela Demke [1 ]
Walpole, Jonathan [3 ]
机构
[1] Univ Toronto, Dept Comp Sci, Toronto, ON M5S 2E4, Canada
[2] IBM Beaveton, IBM Linux Technol Ctr, Beaverton, OR 97006 USA
[3] Portland State Univ, Dept Comp Sci, Portland, OR 97207 USA
关键词
lockless; non-blocking; memory reclamation; hazard pointers; read-copy update; synchronization; concurrency; performance;
D O I
10.1016/j.jpdc.2007.04.010
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Achieving high performance for concurrent applications on modem multiprocessors remains challenging. Many programmers avoid locking to improve performance, while others replace locks with non-blocking synchronization to protect against deadlock, priority inversion, and convoying. In both cases, dynamic data structures that avoid locking require a memory reclamation scheme that reclaims elements once they are no longer in use. The performance of existing memory reclamation schemes has not been thoroughly evaluated. We conduct the first fair and comprehensive comparison of three recent schemes-quiescent-state-based reclamation, epoch-based reclamation, and hazard-pointer-based reclamation-using a flexible microbenchmark. Our results show that there is no globally optimal scheme. When evaluating lockless synchronization, programmers and algorithm designers should thus carefully consider the data structure, the workload, and the execution environment, each of which can dramatically affect the memory reclamation performance. We discuss the consequences of our results for programmers and algorithm designers. Finally, we describe the use of one scheme, quiescent-state-based reclamation, in the context of an OS kernel-an execution environment which is well suited to this scheme. (c) 2007 Elsevier Inc. All rights reserved.
引用
收藏
页码:1270 / 1285
页数:16
相关论文
共 39 条
[1]   Shared memory consistency models: A tutorial [J].
Adve, SV ;
Gharachorloo, K .
COMPUTER, 1996, 29 (12) :66-&
[2]  
Anderson T. E., 1990, IEEE Transactions on Parallel and Distributed Systems, V1, P6, DOI 10.1109/71.80120
[3]  
Arcangeli A., 2003, P 2003 USENIX ANN TE
[4]  
Berger Emery D., 2000, P 9 INT C ARCH SUPP
[5]  
BOEHM HJ, 2004, P 23 ACM S PRINC DIS
[6]  
BONWICK J, 2001, USENIX TECHNICAL C
[7]   Unreliable failure detectors for reliable distributed systems [J].
Chandra, TD ;
Toueg, S .
JOURNAL OF THE ACM, 1996, 43 (02) :225-267
[8]   Lock-free reference counting [J].
Detlefs, DL ;
Martin, PA ;
Moir, M ;
Steele, GL .
DISTRIBUTED COMPUTING, 2002, 15 (04) :255-271
[9]  
Fraser Keir, 2004, Ph. D. Dissertation
[10]  
GAMSA B, 1999, P 3 S OP SYST DES IM