[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to main content

A Lazy Concurrent List-Based Set Algorithm

  • Conference paper
Principles of Distributed Systems (OPODIS 2005)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 3974))

Included in the following conference series:

Abstract

List-based implementations of sets are a fundamental building block of many concurrent algorithms. A skiplist based on the lock-free list-based set algorithm of Michael will be included in the JavaTM Concurrency Package of JDK 1.6.0. However, Michael’s lock-free algorithm has several drawbacks, most notably that it requires all list traversal operations, including membership tests, to perform cleanup operations of logically removed nodes, and that it uses the equivalent of an atomically markable reference, a pointer that can be atomically “marked,” which is expensive in some languages and unavailable in others.

We present a novel “lazy” list-based implementation of a concurrent set object. It is based on an optimistic locking scheme for inserts and removes, eliminating the need to use the equivalent of an atomically markable reference. It also has a novel wait-free membership test operation (as opposed to Michael’s lock-free one) that does not need to perform cleanup operations and is more efficient than that of all previous algorithms.

Empirical testing shows that the new lazy-list algorithm consistently outperforms all known algorithms, including Michael’s lock-free algorithm, throughout the concurrency range. At high load, with 90% membership tests, the lazy algorithm is more than twice as fast as Michael’s. This is encouraging given that typical search structure usage patterns include around 90% membership tests. By replacing the lock-free membership test of Michael’s algorithm with our new wait-free one, we achieve an algorithm that slightly outperforms our new lazy-list (though it may not be as efficient in other contexts as it uses Java’s RTTI mechanism to create pointers that can be atomically marked).

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

Access this chapter

Subscribe and save

Springer+ Basic
£29.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
GBP 19.95
Price includes VAT (United Kingdom)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
GBP 35.99
Price includes VAT (United Kingdom)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
GBP 44.99
Price includes VAT (United Kingdom)
  • 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.

Similar content being viewed by others

References

  1. Bayer, R., Schkolnick, M.: Concurrency of operations on b-trees. Acta Informatica 9, 1–21 (1977)

    Article  MathSciNet  MATH  Google Scholar 

  2. Eckel, B.: Thinking in Java, 2nd edn. Pearson Education (2000)

    Google Scholar 

  3. Harris, T.: A pragmatic implementation of non-blocking linked-lists. In: Welch, J.L. (ed.) DISC 2001. LNCS, vol. 2180, pp. 300–314. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

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

    Article  Google Scholar 

  5. 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, vol. 2508, pp. 339–353. Springer, Heidelberg (2002)

    Google Scholar 

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

  7. Lea, D.: Personal communication

    Google Scholar 

  8. Lea, D.: Concurrent Programming in Java(TM): Design Principles and Patterns, 2nd edn. Addison-Wesley, Reading (1999)

    Google Scholar 

  9. Maier, C.: Hello Laziness: Why Hard Work Doesn’t Pay. Orion, London (2005)

    Google Scholar 

  10. Michael, M.: High performance dynamic lock-free hash tables and list-based sets. In: Proceedings of the fourteenth annual ACM symposium on Parallel algorithms and architectures, pp. 73–82. ACM Press, New York (2002)

    Google Scholar 

  11. Michael, M.: Safe memory reclamation for dynamic lock-free objects using atomic reads and writes. In: The 21st Annual ACM Symposium on Principles of Distributed Computing, pp. 21–30. ACM Press, New York (2002)

    Google Scholar 

  12. Moir, M., Shavit, N.: Chapter 47 – Concurrent Data Structures – Handbook of Data Structures and Applications, 1st edn. Chapman and Hall/CRC (2004)

    Google Scholar 

  13. Vafeiadis, V., Herlihy, M., Hoare, T., Shapiro, M.: Proving correctness of highly-concurrent linearisable objects. Technical report, Microsoft Research, Cambridge, UK (2005)

    Google Scholar 

  14. Valois, J.: Lock-free linked lists using compare-and-swap. In: ACM Symposium on Principles of Distributed Computing, pp. 214–222 (1995)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Heller, S., Herlihy, M., Luchangco, V., Moir, M., Scherer, W.N., Shavit, N. (2006). A Lazy Concurrent List-Based Set Algorithm. In: Anderson, J.H., Prencipe, G., Wattenhofer, R. (eds) Principles of Distributed Systems. OPODIS 2005. Lecture Notes in Computer Science, vol 3974. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11795490_3

Download citation

  • DOI: https://doi.org/10.1007/11795490_3

  • Publisher Name: Springer, Berlin, Heidelberg

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

  • Online ISBN: 978-3-540-36322-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics