Skip to main content
U.S. Department of Energy
Office of Scientific and Technical Information

Are Lock-Free Concurrent Algorithms Practically Wait-Free?

Journal Article · · Journal of the Association for Computing Machinery
DOI:https://doi.org/10.1145/2903136· OSTI ID:1557574
 [1];  [2];  [3]
  1. ETH Zurich, Zürich (Switzerland); Office of Scientific and Technical Information (OSTI)
  2. Technion, Haifa (Israel)
  3. Massachusetts Inst. of Technology (MIT), Cambridge, MA (United States); Tel-Aviv Univ., Tel Aviv (Israel)

Lock-free concurrent algorithms guarantee that some concurrent operation will always make progress in a finite number of steps. Yet programmers prefer to treat concurrent code as if it were wait-free, guaranteeing that all operations always make progress. Unfortunately, designing wait-free algorithms is generally a very complex task, and the resulting algorithms are not always efficient. Although obtaining efficient wait-free algorithms has been a long-time goal for the theory community, most nonblocking commercial code is only lock-free. This article suggests a simple solution to this problem. We show that for a large class of lock-free algorithms, under scheduling conditions that approximate those found in commercial hardware architectures, lock-free algorithms behave as if they are wait-free. In other words, programmers can continue to design simple lock-free algorithms instead of complex wait-free ones, and in practice, they will get wait-free progress. Our main contribution is a new way of analyzing a general class of lock-free algorithms under a stochastic scheduler. Our analysis relates the individual performance of processes to the global performance of the system using Markov chain lifting between a complex per-process chain and a simpler system progress chain. We show that lock-free algorithms are not only wait-free with probability 1 but that in fact a general subset of lock-free algorithms can be closely bounded in terms of the average number of steps required until an operation completes. Here, to the best of our knowledge, this is the first attempt to analyze progress conditions, typically stated in relation to a worst-case adversary, in a stochastic model capturing their expected asymptotic behavior.

Research Organization:
Massachusetts Inst. of Technology (MIT), Cambridge, MA (United States)
Sponsoring Organization:
USDOE Office of Science (SC), Advanced Scientific Computing Research (ASCR) (SC-21)
Grant/Contract Number:
SC0008923
OSTI ID:
1557574
Journal Information:
Journal of the Association for Computing Machinery, Journal Name: Journal of the Association for Computing Machinery Journal Issue: 4 Vol. 63; ISSN 0004-5411
Publisher:
ACMCopyright Statement
Country of Publication:
United States
Language:
English

References (17)

A new solution of Dijkstra's concurrent programming problem journal August 1974
Practical lock-freedom report January 2004
Obstruction-Free Step Complexity: Lock-Free DCAS as an Example book January 2005
Obstruction-Free Algorithms Can Be Practically Wait-Free book January 2005
Liftings of Tree-Structured Markov Chains book January 2010
Analyzing the Performance of Lock-Free Data Structures: A Conflict-Based Model book January 2015
Fast deterministic consensus in a noisy environment journal October 2002
Markov Chains and Mixing Times book January 2009
Wait-free synchronization journal January 1991
Simple, fast, and practical non-blocking and blocking concurrent queue algorithms conference January 1996
Nonblocking algorithms and scalable multicore programming journal July 2013
Scalable statistics counters conference January 2013
Are lock-free concurrent algorithms practically wait-free? conference January 2014
Lock-Free Algorithms under Stochastic Schedulers conference January 2015
Lease/release: architectural support for scaling contended data structures
  • Haider, Syed Kamran; Hasenplaugh, William; Alistarh, Dan
  • Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming - PPoPP '16 https://doi.org/10.1145/2851141.2851155
conference January 2016
Lifting Markov chains to speed up mixing conference January 1999
The read-copy-update mechanism for supporting real-time applications on shared-memory multiprocessor systems with Linux journal January 2008

Cited By (4)


Similar Records

Nonblocking algorithm for shared queues using compare-and-swap
Journal Article · Sun May 01 00:00:00 EDT 1994 · IEEE Transactions on Computers (Institute of Electrical and Electronics Engineers); (United States) · OSTI ID:6697614

Effective Software Design and Development for the New Graph Architecture HPC Machines
Technical Report · Fri Mar 16 20:00:00 EDT 2012 · OSTI ID:1039407

Highly concurrent scalar processing. Doctoral thesis
Technical Report · Tue Dec 31 23:00:00 EST 1985 · OSTI ID:5975786