Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article
Public Access

Are Lock-Free Concurrent Algorithms Practically Wait-Free?

Published: 14 September 2016 Publication History

Abstract

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.
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.

References

[1]
Samy Al-Bahra. 2013. Nonblocking algorithms and scalable multicore programming. Communications of the ACM 56, 7, 50--61.
[2]
Dan Alistarh, Keren Censor-Hillel, and Nir Shavit. 2013. Are lock-free concurrent algorithms practically wait-free? arXiv:1311.3200.
[3]
Dan Alistarh, Keren Censor-Hillel, and Nir Shavit. 2014. Are lock-free concurrent algorithms practically wait-free? In Proceedings of the 46th Annual ACM Symposium on Theory of Computing (STOC’14). ACM, New York, NY, 714--723.
[4]
Dan Alistarh, Thomas Sauerwald, and Milan Vojnović. 2015. Lock-free algorithms under stochastic schedulers. In Proceedings of the 2015 ACM Symposium on Principles of Distributed Computing (PODC’15). ACM, New York, NY, 251--260.
[5]
James Aspnes. 2002. Fast deterministic consensus in a noisy environment. Journal of Algorithms 45, 1, 16--39.
[6]
Aras Atalar, Paul Renaud-Goud, and Philippas Tsigas. 2015. Analyzing the performance of lock-free data structures: A conflict-based model. In Proceedings of the 29th International Symposium on Distributed Computing (DISC’15). 341--355.
[7]
Fang Chen, László Lovász, and Igor Pak. 1999. Lifting Markov chains to speed up mixing. In Proceedings of the 31st Annual ACM Symposium on Theory of Computing (STOC’99). ACM, New York, NY, 275--281.
[8]
Dave Dice, Yossi Lev, and Mark Moir. 2013. Scalable statistics counters. In Proceedings of the 25th ACM Symposium on Parallelism in Algorithms and Architectures (SPAA’13). 43--52.
[9]
Faith Ellen Fich, Victor Luchangco, Mark Moir, and Nir Shavit. 2005. Obstruction-free algorithms can be practically wait-free. In Proceedings of the International Symposium on Distributed Computing. 493--494.
[10]
Keir Fraser. 2004. Practical Lock-Freedom. Technical Report UCAM-CL-TR-579. Computer Laboratory, University of Cambridge, Cambridge, UK.
[11]
D. Guniguntala, P. E. McKenney, J. Triplett, and J. Walpole. 2008. The read-copy-update mechanism for supporting real-time applications on shared-memory multiprocessor systems with Linux. IBM Systems Journal 47, 2, 221--236.
[12]
Syed Kamran Haider, William Hasenplaugh, and Dan Alistarh. 2016. Lease/release: Architectural support for scaling contended data structures. In Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP’16). ACM, New York, NY, Article No. 17.
[13]
Thomas P. Hayes and Alistair Sinclair. 2010. Liftings of tree-structured Markov chains. In Proceedings of the 13th International Conference on Approximation, and the 14th International Conference on Randomization and Combinatorial Optimization: Algorithms and Techniques (APPROX/RANDOM’10). 602--616. http://dl.acm.org/citation.cfm?id=1886521.1886568
[14]
Maurice Herlihy. 1991. Wait-free synchronization. ACM Transactions on Programming Languages and Systems 13, 1, 123--149.
[15]
Maurice Herlihy and Nir Shavit. 2011. On the nature of progress. In Proceedings of the 15th International Conference on Distributed Systems (OPODIS’11). 313--328.
[16]
David A. Levin, Yuval Peres, and Elizabeth L. Wilmer. 2008. Markov Chains and Mixing Times. American Mathematical Society, Providence, RI.
[17]
Maged M. Michael and Michael L. Scott. 1996. Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In Proceedings of the 15th Annual ACM Symposium on Principles of Distributed Computing (PODC’96). 267--275.
[18]
Michael Mitzenmacher and Eli Upfal. 2005. Probability and Computing: Randomized Algorithms and Probabilistic Analysis. Cambridge University Press, New York, NY.
[19]
R. K. Treiber. 1986. Systems Programming: Coping with Parallelism. Technical Report RJ 5118. IBM Almaden Research Center, San Jose, CA.

Cited By

View all
  • (2023)Quancurrent: A Concurrent Quantiles SketchProceedings of the 35th ACM Symposium on Parallelism in Algorithms and Architectures10.1145/3558481.3591074(15-25)Online publication date: 17-Jun-2023
  • (2022)WRLqueue: A Lock-Free Queue For Embedded Real-Time System2022 IEEE 24th Int Conf on High Performance Computing & Communications; 8th Int Conf on Data Science & Systems; 20th Int Conf on Smart City; 8th Int Conf on Dependability in Sensor, Cloud & Big Data Systems & Application (HPCC/DSS/SmartCity/DependSys)10.1109/HPCC-DSS-SmartCity-DependSys57074.2022.00197(1255-1260)Online publication date: Dec-2022
  • (2020)Design-space evaluation for non-blocking synchronization in Ada: lock elision of protected objects, concurrent objects, and low-level atomicsJournal of Systems Architecture10.1016/j.sysarc.2020.101764110(101764)Online publication date: Nov-2020
  • Show More Cited By

Index Terms

  1. Are Lock-Free Concurrent Algorithms Practically Wait-Free?

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image Journal of the ACM
      Journal of the ACM  Volume 63, Issue 4
      November 2016
      365 pages
      ISSN:0004-5411
      EISSN:1557-735X
      DOI:10.1145/2997039
      Issue’s Table of Contents
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 14 September 2016
      Accepted: 01 March 2016
      Received: 01 March 2015
      Published in JACM Volume 63, Issue 4

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. Distributed computing
      2. lock-free algorithms
      3. progress properties
      4. schedulers
      5. shared memory
      6. wait-free algorithms

      Qualifiers

      • Research-article
      • Research
      • Refereed

      Funding Sources

      • ISF
      • NSF
      • Oracle and Intel corporations
      • U.S. Department of Energy
      • SNF Postdoctoral Fellows Program
      • DoE ASCR
      • equipment grants from Intel Corporation

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)79
      • Downloads (Last 6 weeks)10
      Reflects downloads up to 04 Oct 2024

      Other Metrics

      Citations

      Cited By

      View all
      • (2023)Quancurrent: A Concurrent Quantiles SketchProceedings of the 35th ACM Symposium on Parallelism in Algorithms and Architectures10.1145/3558481.3591074(15-25)Online publication date: 17-Jun-2023
      • (2022)WRLqueue: A Lock-Free Queue For Embedded Real-Time System2022 IEEE 24th Int Conf on High Performance Computing & Communications; 8th Int Conf on Data Science & Systems; 20th Int Conf on Smart City; 8th Int Conf on Dependability in Sensor, Cloud & Big Data Systems & Application (HPCC/DSS/SmartCity/DependSys)10.1109/HPCC-DSS-SmartCity-DependSys57074.2022.00197(1255-1260)Online publication date: Dec-2022
      • (2020)Design-space evaluation for non-blocking synchronization in Ada: lock elision of protected objects, concurrent objects, and low-level atomicsJournal of Systems Architecture10.1016/j.sysarc.2020.101764110(101764)Online publication date: Nov-2020
      • (2019)Unfair Scheduling Patterns in NUMA Architectures2019 28th International Conference on Parallel Architectures and Compilation Techniques (PACT)10.1109/PACT.2019.00024(205-218)Online publication date: Sep-2019
      • (2017)Analyzing Contention and Backoff in Asynchronous Shared MemoryProceedings of the ACM Symposium on Principles of Distributed Computing10.1145/3087801.3087828(53-62)Online publication date: 25-Jul-2017

      View Options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Get Access

      Login options

      Full Access

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media