Skip to main content

On the Uncontended Complexity of Consensus

  • Conference paper
Book cover Distributed Computing (DISC 2003)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2848))

Included in the following conference series:

Abstract

Lock-free algorithms are not required to guarantee a bound on the number of steps an operation takes under contention, so we cannot use the usual worst-case analysis to quantify them. A natural alternative is to consider the worst-case time complexity of operations executed in the more common uncontended case.

Many state-of-the-art lock-free algorithms rely on compare-and-swap (CAS) or similar operations with high consensus number to allow effective interprocess coordination. Given the fundamental nature of consensus operations to interprocess coordination, and the fact that instructions such as CAS are usually significantly more costly than simple loads and stores, it seems natural to consider a complexity measure that counts the number of operations with higher consensus number.

In this paper we show that, despite its natural appeal, such a measure is not useful. We do so by showing that one can devise a wait-free implementation of the universal compare-and-swap operation, with a “fast path” that requires only a constant number of loads and stores when the CAS is executed without contention, and uses a hardware CAS operation only if there is contention. Thus, at least in theory, any CAS-based algorithm can be transformed into one that does not invoke any CAS operations along its uncontended “fast path”, so simply counting the number of such operations invoked in this case is meaningless.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Arora, N.S., Blumofe, R.D., Plaxton, C.G.: Thread scheduling for multipro-grammed multiprocessors. In: Proceedings of the 10th Annual ACM Symposium on Parallel Algorithms and Architectures, pp. 119–129 (1998)

    Google Scholar 

  2. Bershad, B.N.: Practical considerations for non-blocking concurrent objects. In: Proceedings 13th IEEE International Conference on Distributed Computing Systems, pp. 264–273 (1993)

    Google Scholar 

  3. Buhrman, H., Garay, J., Hoepman, J., Moir, M.: Long-lived renaming made fast. In: Proceedings of the 14th Annual ACM Symposium on Principles of Distributed Computing, pp. 194–203 (1995)

    Google Scholar 

  4. Fich, F., Herlihy, M., Shavit, N.: On the space complexity of randomized synchronization. Journal of the ACM 45(5), 843–862 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  5. Fischer, M., Lynch, N., Paterson, M.: Impossibility of distributed consensus with one faulty process. Journal of the ACM, 374–382 (1985)

    Google Scholar 

  6. Harris, T.L.: A pragmatic implementation of non-blocking linked lists. In: Proceedings of the 15th International Symposium on Distributed Computing (2001)

    Google Scholar 

  7. Harris, T.L., Fraser, K., Pratt, I.A.: A practical multi-word compare-and-swap operation. In: Proceedings of 16th International Symposium on DIStributed Computing (2002)

    Google Scholar 

  8. Hendler, D., Shavit, N.: Non-blocking steal-half work queues. In: Proceedings of the 21st Annual ACM Symposium on Principles of Distributed Computing, pp. 280–289 (2002)

    Google Scholar 

  9. Herlihy, M.: Wait-free synchronization. ACM Transactions on Programming Languages and Systems 13(1), 124–149 (1991)

    Article  Google Scholar 

  10. Herlihy, M., Luchangco, V., Moir, M.: Obstruction-free software NCAS and transactional memory (2002) (unpublished manuscript)

    Google Scholar 

  11. Herlihy, M., Luchangco, V., Moir, M.: The repeat offender problem: A mechanism for supporting lock-free dynamic-sized data structures. In: Proceedings of the 16th International Symposium on DIStributed Computing (2002); A improved version of this paper is in preparation for journal submission; please contact authors

    Google Scholar 

  12. Herlihy, M., Luchangco, V., Moir, M.: Obstruction-free synchronization: Double-ended queues as an example. In: Proceedings of the 23rd International Conference on Distributed Computing Systems (2003)

    Google Scholar 

  13. Herlihy, M., Luchangco, V., Moir, M.: Space- and time-adaptive nonblocking algorithms. In: Proceedings of Computing: The Australasian Theory Symposium, CATS (2003)

    Google Scholar 

  14. Herlihy, M., Luchangco, V., Moir, M., Scherer III., W.N.: Software transactional memory of dynamic-sized data structures. In: Proceedings of the 22nd Annual ACM Symposium on Principles of Distributed Computing (2003)

    Google Scholar 

  15. Herlihy, M., Wing, J.: Linearizability: A correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems 12(3), 463–492 (1990)

    Article  Google Scholar 

  16. Kawachiya, K., Koseki, A., Onodera, T.: Lock reservation: Java locks can mostly do without atomic operations. In: Proceedings of the ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pp. 130–141 (2002)

    Google Scholar 

  17. LaMarca, A.: A performance evaluation of lock-free synchronization protocols. In: Proceedings of the 13th Annual ACM Symposium on Principles of Distributed Computing, Los Angeles, CA, pp. 130–140 (1994)

    Google Scholar 

  18. Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocessor programs. IEEE Transactions on Computers C-28(9), 690–691 (1979)

    Article  Google Scholar 

  19. Lamport, L.: A fast mutual exclusion algorithm. ACM Transactions on Computer Systems 5(1), 1–11 (1987)

    Article  Google Scholar 

  20. Loui, M.C., Abu-Amara, H.H.: Memory requirements for agreement among unreliable asynchronous processes. In: Preparata, F.P. (ed.) Advances in Computing Research, vol. 4, pp. 163–183. JAI Press, Greenwich (1987)

    Google Scholar 

  21. Luchangco, V., Moir, M., Shavit, N.: On the uncontended complexity of consensus (2002) (in preparation)

    Google Scholar 

  22. Lynch, N., Vaandrager, F.: Forward and backward simulations - part I: Untimed systems. Information and Computation 121(2), 214–233 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  23. Michael, M.M.: High performance dynamic lock-free hash tables and list-based sets. In: Proceedings of the 14th Annual ACM Symposium on Parallel Algorithms and Architectures, pp. 73–82 (2002)

    Google Scholar 

  24. Moir, M., Anderson, J.: Wait-free algorithms for fast, long-lived renaming. Science of Computer Programming 25, 1–39 (1995); A preliminary version appeared in Proceedings of the 8th International Workshop on Distributed Algorithms, pp. 141–155 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  25. Saks, M., Shavit, N., Woll, H.: Optimal time randomized consensus — making resilient algorithms fast in practice. In: Proceedings of the Second Annual ACM-SIAM Symposium on Discrete algorithms, pp. 351–362 (1991)

    Google Scholar 

  26. Shalev, O., Shavit, N.: Split-ordered lists — lock-free resizable hash tables. In: Proceedings of the 22nd Annual ACM Symposium on Principles of Distributed Computing (2003)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Luchangco, V., Moir, M., Shavit, N. (2003). On the Uncontended Complexity of Consensus. In: Fich, F.E. (eds) Distributed Computing. DISC 2003. Lecture Notes in Computer Science, vol 2848. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-39989-6_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-39989-6_4

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-20184-7

  • Online ISBN: 978-3-540-39989-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics