Are Lock-Free Concurrent Algorithms Practically Wait-Free?
- ETH Zurich, Zürich (Switzerland); Office of Scientific and Technical Information (OSTI)
- Technion, Haifa (Israel)
- 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
| How Lock-free Data Structures Perform in Dynamic Environments: Models and Analyses | preprint | January 2016 |
| D2.3 Power models, energy models and libraries for energy-efficient concurrent data structures and algorithms | preprint | January 2018 |
| D2.4 Report on the final prototype of programming abstractions for energy-efficient inter-process communication | preprint | January 2018 |
| Recoverable Consensus in Shared Memory | preprint | January 2018 |
Similar Records
Effective Software Design and Development for the New Graph Architecture HPC Machines
Highly concurrent scalar processing. Doctoral thesis