A Simple Optimistic Skiplist Algorithm

  • Maurice Herlihy
  • Yossi Lev
  • Victor Luchangco
  • Nir Shavit
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4474)

Abstract

Because of their highly distributed nature and the lack of global rebalancing, skiplists are becoming an increasingly important logarithmic search structure for concurrent applications. Unfortunately, none of the concurrent skiplist implementations in the literature, whether lock-based or lock-free, have been proven correct. Moreover, the complex structure of these algorithms, most likely the reason for a lack of a proof, is a barrier to software designers that wish to extend and modify the algorithms or base new structures on them.

This paper proposes a simple new lock-based concurrent skiplist algorithm. Unlike other concurrent skiplist algorithms, this algorithm preserves the skiplist properties at all times, which facilitates reasoning about its correctness. Though it is lock-based, the algorithm is highly scalable due to a novel use of optimistic synchronization: it searches without acquiring locks, requiring only a short lock-based validation before adding or removing nodes. Experimental evidence shows that this simpler algorithm performs as well as the best previously known lock-free algorithm under the most common search patterns.

References

  1. 1.
    Luchangco, V., et al.: Formal Verification of a Lazy Concurrent List-Based Set Algorithm. In: Ball, T., Jones, R.B. (eds.) CAV 2006. LNCS, vol. 4144, pp. 475–488. Springer, Heidelberg (2006)Google Scholar
  2. 2.
    Fraser, K.: Practical Lock-Freedom. PhD thesis, University of Cambridge (2004)Google Scholar
  3. 3.
    Fraser, K., Harris, T.: Concurrent programming without locks. Unpublished manuscript (2004)Google Scholar
  4. 4.
    Herlihy, M.P., et al.: A Lazy Concurrent List-Based Set Algorithm. In: Anderson, J.H., Prencipe, G., Wattenhofer, R. (eds.) OPODIS 2005. LNCS, vol. 3974, pp. 3–16. Springer, Heidelberg (2006)Google Scholar
  5. 5.
    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
  6. 6.
    Herlihy, M., Luchangco, V., Moir, M.: The repeat offender problem: A mechanism for supporting dynamic-sized, lock-free data structures. In: Malkhi, D. (ed.) DISC 2002. LNCS, vol. 2508, Springer, Heidelberg (2002)CrossRefGoogle Scholar
  7. 7.
    Lea, D.: Personal communication (2005)Google Scholar
  8. 8.
    Lea, D.: Concurrent Skip List Map. In: java.util.concurrentGoogle Scholar
  9. 9.
    Michael, M.: Hazard pointers: Safe memory reclamation for lock-free objects. IEEE Transactions on Parallel and Distributed Systems 15(6), 491–504 (2004)CrossRefGoogle Scholar
  10. 10.
    Pugh, W.: Concurrent maintenance of skip lists. Technical Report CS-TR-2222, University of Maryland (1990)Google Scholar
  11. 11.
    Pugh, W.: A probabilistic alternative to balanced trees. Communications of the ACM 33(6), 668–676 (1990)CrossRefMathSciNetGoogle Scholar

Copyright information

© Springer Berlin Heidelberg 2007

Authors and Affiliations

  • Maurice Herlihy
    • 1
    • 3
  • Yossi Lev
    • 1
    • 3
  • Victor Luchangco
    • 3
  • Nir Shavit
    • 2
    • 3
  1. 1.Brown University, Box 1910, Computer Science Department, Providence, RI 02912 
  2. 2.Tel Aviv University, School of Computer Science, Ramat Aviv, 69978Israel
  3. 3.Sun Microsystems Laboratories, 1 Network Drive, Burlington, MA 01803-0903 

Personalised recommendations