Advertisement

On the Uncontended Complexity of Consensus

  • Victor Luchangco
  • Mark Moir
  • Nir Shavit
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2848)

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.

Keywords

Current Block Consensus Algorithm Linearization Point Fast Path Software Transactional Memory 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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. 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. 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. 4.
    Fich, F., Herlihy, M., Shavit, N.: On the space complexity of randomized synchronization. Journal of the ACM 45(5), 843–862 (1998)zbMATHCrossRefMathSciNetGoogle Scholar
  5. 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. 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. 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. 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. 9.
    Herlihy, M.: Wait-free synchronization. ACM Transactions on Programming Languages and Systems 13(1), 124–149 (1991)CrossRefGoogle Scholar
  10. 10.
    Herlihy, M., Luchangco, V., Moir, M.: Obstruction-free software NCAS and transactional memory (2002) (unpublished manuscript)Google Scholar
  11. 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 authorsGoogle Scholar
  12. 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. 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. 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. 15.
    Herlihy, M., Wing, J.: Linearizability: A correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems 12(3), 463–492 (1990)CrossRefGoogle Scholar
  16. 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. 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. 18.
    Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocessor programs. IEEE Transactions on Computers C-28(9), 690–691 (1979)CrossRefGoogle Scholar
  19. 19.
    Lamport, L.: A fast mutual exclusion algorithm. ACM Transactions on Computer Systems 5(1), 1–11 (1987)CrossRefGoogle Scholar
  20. 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. 21.
    Luchangco, V., Moir, M., Shavit, N.: On the uncontended complexity of consensus (2002) (in preparation)Google Scholar
  22. 22.
    Lynch, N., Vaandrager, F.: Forward and backward simulations - part I: Untimed systems. Information and Computation 121(2), 214–233 (1995)zbMATHCrossRefMathSciNetGoogle Scholar
  23. 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. 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) zbMATHCrossRefMathSciNetGoogle Scholar
  25. 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. 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

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Victor Luchangco
    • 1
  • Mark Moir
    • 1
  • Nir Shavit
    • 2
  1. 1.Sun Microsystems LaboratoriesBurlingtonUSA
  2. 2.The School of Computer ScienceTel Aviv UniversityTel AvivIsrael

Personalised recommendations