[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1007/11795490_3guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

A lazy concurrent list-based set algorithm

Published: 12 December 2005 Publication History

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

References

[1]
R. Bayer and M. Schkolnick. Concurrency of operations on b-trees. Acta Informatica, 9:1-21, 1977.
[2]
B. Eckel. Thinking in Java (2nd Edition). Pearson Education, 2000.
[3]
T. Harris. A pragmatic implementation of non-blocking linked-lists. Lecture Notes in Computer Science, 2180:300-314, 2001.
[4]
M. Herlihy. Wait-free synchronization. ACM Transactions on Programming Languages and Systems, 13(1):124-149, January 1991.
[5]
M. Herlihy, V. Luchangco, and M. Moir. The repeat offender problem: A mechanism for supporting lock-free dynamic-sized data structures. In Proceedings of the 16th International Symposium on DIStributed Computing, volume 2508, pages 339-353. Springer-Verlag Heidelberg, January 2002. A improved version of this paper is in preparation for journal submission; please contact authors.
[6]
M. Herlihy and J. Wing. Linearizability: A correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems, 12(3):463- 492, July 1990.
[7]
D. Lea. Personal communication.
[8]
D. Lea. Concurrent Programming in Java(TM): Design Principles and Patterns. Addison-Wesley, second edition edition, 1999.
[9]
Corinne Maier. Hello Laziness: Why Hard Work Doesn't Pay. Orion, London, 2005. ISBN: 0752871862.
[10]
M. Michael. High performance dynamic lock-free hash tables and list-based sets. In Proceedings of the fourteenth annual ACM symposium on Parallel algorithms and architectures, pages 73-82. ACM Press, 2002.
[11]
M. Michael. Safe memory reclamation for dynamic lock-free objects using atomic reads and writes. In The 21st Annual ACM Symposium on Principles of Distributed Computing, pages 21-30. ACM Press, 2002.
[12]
M. Moir and N. Shavit. Chapter 47 - Concurrent Data Structures - Handbook of Data Structures and Applications. Chapman and Hall/CRC, first edition edition, 2004.
[13]
V. Vafeiadis, M. Herlihy, T. Hoare, and M. Shapiro. Proving correctness of highly-concurrent linearisable objects. Technical report, Microsoft Research, Cambridge, UK, 2005.
[14]
J. Valois. Lock-free linked lists using compare-and-swap. In ACM Symposium on Principles of Distributed Computing, pages 214-222, 1995.

Cited By

View all

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Guide Proceedings
OPODIS'05: Proceedings of the 9th international conference on Principles of Distributed Systems
December 2005
442 pages
ISBN:3540363211
  • Editors:
  • James H. Anderson,
  • Giuseppe Prencipe,
  • Roger Wattenhofer

Sponsors

  • Università di Pisa: Università di Pisa

Publisher

Springer-Verlag

Berlin, Heidelberg

Publication History

Published: 12 December 2005

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 17 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Intrathread Method Orders Based Adaptive Testing of Concurrent ObjectsTheoretical Aspects of Software Engineering10.1007/978-3-031-64626-3_6(91-108)Online publication date: 29-Jul-2024
  • (2022)A concurrent program logic with a future and historyProceedings of the ACM on Programming Languages10.1145/35633376:OOPSLA2(1378-1407)Online publication date: 31-Oct-2022
  • (2022)Concurrent sizeProceedings of the ACM on Programming Languages10.1145/35633006:OOPSLA2(345-372)Online publication date: 31-Oct-2022
  • (2022)Fast and Fair Randomized Wait-Free LocksProceedings of the 2022 ACM Symposium on Principles of Distributed Computing10.1145/3519270.3538448(187-197)Online publication date: 20-Jul-2022
  • (2022)Lock-free locks revisitedProceedings of the 27th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming10.1145/3503221.3508433(278-293)Online publication date: 2-Apr-2022
  • (2022)Bundling linked data structures for linearizable range queriesProceedings of the 27th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming10.1145/3503221.3508412(368-384)Online publication date: 2-Apr-2022
  • (2022)PathCASProceedings of the 27th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming10.1145/3503221.3508410(385-399)Online publication date: 2-Apr-2022
  • (2021)Optimal Concurrency for List-Based SetsParallel Computing Technologies10.1007/978-3-030-86359-3_29(386-401)Online publication date: 13-Sep-2021
  • (2020)Memory Tagging: Minimalist Synchronization for Scalable Concurrent Data StructuresProceedings of the 32nd ACM Symposium on Parallelism in Algorithms and Architectures10.1145/3350755.3400213(37-49)Online publication date: 6-Jul-2020
  • (2020)Entropy Measurement of Concurrent DisorderQuantitative Evaluation of Systems10.1007/978-3-030-59854-9_18(239-257)Online publication date: 31-Aug-2020
  • Show More Cited By

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media