Lock-free locks revisited
Lock-free locks revisited
复制标题
重温无锁锁
DOI:
10.1145/3503221.3508433
复制
发表时间:
2022
期刊:
影响因子:
--
通讯作者:
Wei, Yuanhao
中科院分区:
文献类型:
--
作者:
Ben-David, Naama;Blelloch, Guy E.;Wei, Yuanhao
This paper presents a new and practical approach to lock-free locks based on helping, which allows the user to write code using fine-grained locks, but run it in a lock-free manner. Although lock-free locks have been suggested in the past, they are widely viewed as impractical, have some key limitations, and, as far as we know, have never been implemented. The paper presents some key techniques that make lock-free locks practical and more general. The most important technique is an approach to idempotence---i.e. making code that runs multiple times appear as if it ran once. The idea is based on using a shared log among processes running the same protected code. Importantly, the approach can be library based, requiring very little if any change to standard code---code just needs to use the idempotent versions of memory operations (load, store, LL/SC, allocation, free).We have implemented a C++ library called Flock based on the ideas. Flock allows lock-based data structures to run in either lock-free or blocking (traditional locks) mode. We implemented a variety of tree and list-based data structures with Flock and compare the performance of the lock-free and blocking modes under a variety of workloads. The lock-free mode is almost as fast as blocking mode under almost all workloads, and significantly faster when threads are over-subscribed (more threads than processors). We also compare with several existing lock-based and lock-free alternatives.
登录
查看更多内容
DOI:
10.1145/3460874
发表时间:
2018-07
期刊:
ACM Transactions on Parallel Computing (TOPC)
影响因子:
--
作者:
Kjell Winblad;Konstantinos Sagonas;B. Jonsson
通讯作者:
Kjell Winblad;Konstantinos Sagonas;B. Jonsson
DOI:
10.4230/lipics.disc.2020.4
发表时间:
2020
期刊:
Proceedings of the 19th ACM SIGPLAN symposium on Principles and practice of parallel programming
影响因子:
--
作者:
R. Guerraoui;Alex Kogan;Virendra J. Marathe;I. Zablotchi
通讯作者:
I. Zablotchi
DOI:
10.1147/sj.472.0221
发表时间:
2008-04
期刊:
IBM Syst. J.
影响因子:
--
作者:
Dinakar Guniguntala;P. McKenney;J. Triplett;J. Walpole
通讯作者:
Dinakar Guniguntala;P. McKenney;J. Triplett;J. Walpole
影响因子:
0.6
作者:
R. Bayer;M. Schkolnick
通讯作者:
R. Bayer;M. Schkolnick
DOI:
10.1007/3-540-36108-1_18
发表时间:
2002-10
期刊:
--
影响因子:
--
作者:
T. Harris;K. Fraser;I. Pratt
通讯作者:
T. Harris;K. Fraser;I. Pratt