A Simple Optimistic Skiplist Algorithm
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.
- 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.Fraser, K.: Practical Lock-Freedom. PhD thesis, University of Cambridge (2004)Google Scholar
- 3.Fraser, K., Harris, T.: Concurrent programming without locks. Unpublished manuscript (2004)Google Scholar
- 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
- 7.Lea, D.: Personal communication (2005)Google Scholar
- 8.Lea, D.: Concurrent Skip List Map. In: java.util.concurrentGoogle Scholar
- 10.Pugh, W.: Concurrent maintenance of skip lists. Technical Report CS-TR-2222, University of Maryland (1990)Google Scholar