An Efficient Lock-Free Logarithmic Search Data Structure Based on Multi-dimensional List

Logarithmic search data structures, such as search trees and skiplists, are fundamental building blocks of many applications. Although the self-balancing binary search trees are among the most ubiquitous sequential search data structures, designing non-blocking rebalancing algorithms is challenging due to the required structural alternation, which may stall other concurrent operations. Skiplists, which probabilistically create multiple levels of shortcuts in an ordered list, provide practical alternatives to balanced search trees. The use of skiplists eliminates the need of rebalancing and ensures amortized logarithmic sequential search time, but concurrency is limited under write-dominated workload because the linkage between multiple distant nodes must be updated. In this paper, we present a linearizable lock-free dictionary design based on a multi-dimensional list (MDList). A node in an MDList arranges its child nodes by their dimensionality and order them by coordinate prefixes. The search operation works by first generating a one-to-one mapping from the scalar keys to a high-dimensional vectors space, then uniquely locating the target position by using the vector as coordinates. Our algorithm guarantees worst-case search time of O(log N) where N is the size of key space. Moreover, the ordering property of the data structure is readily maintained during mutations without rebalancing nor randomization. In our experimental evaluation using a micro-benchmark, our dictionary outperforms the state of the art approaches by as much as 100% when the key universe is large and an average of 30% across all scenarios.

[1]  Shane V. Howley,et al.  A non-blocking internal binary search tree , 2012, SPAA '12.

[2]  Maurice Herlihy,et al.  Linearizability: a correctness condition for concurrent objects , 1990, TOPL.

[3]  Neeraj Mittal,et al.  Fast concurrent lock-free binary search trees , 2014, PPoPP.

[4]  Martin Odersky,et al.  Concurrent tries with efficient non-blocking snapshots , 2012, PPoPP '12.

[5]  Baptiste Wicht Binary Trees Implementations Comparison for Multicore Programming , 2012 .

[6]  Faith Ellen,et al.  A general technique for non-blocking trees , 2014, PPoPP '14.

[7]  Nir Shavit,et al.  Scalable concurrent priority queue algorithms , 1999, PODC '99.

[8]  Paul F. Reynolds,et al.  Lock-Free Multiway Search Trees , 2010, 2010 39th International Conference on Parallel Processing.

[9]  William Pugh,et al.  Concurrent maintenance of skip lists , 1990 .

[10]  Nir Shavit,et al.  The SkipTrie: low-depth concurrent search without rebalancing , 2013, PODC '13.

[11]  Philippas Tsigas,et al.  Scalable and lock-free concurrent dictionaries , 2004, SAC '04.

[12]  Faith Ellen,et al.  Non-blocking binary search trees , 2010, PODC.

[13]  Deli Zhang,et al.  A Lock-Free Priority Queue Design Based on Multi-Dimensional Linked Lists , 2016, IEEE Transactions on Parallel and Distributed Systems.

[14]  Bengt Jonsson,et al.  A Skiplist-Based Concurrent Priority Queue with Minimal Memory Contention , 2013, OPODIS.

[15]  Timothy L. Harris,et al.  A Pragmatic Implementation of Non-blocking Linked-Lists , 2001, DISC.

[16]  Michel Raynal,et al.  No Hot Spot Non-blocking Skip List , 2013, 2013 IEEE 33rd International Conference on Distributed Computing Systems.

[17]  Maged M. Michael Hazard pointers: safe memory reclamation for lock-free objects , 2004, IEEE Transactions on Parallel and Distributed Systems.

[18]  William Pugh,et al.  Skip Lists: A Probabilistic Alternative to Balanced Trees , 1989, WADS.

[19]  Maurice Herlihy,et al.  The Art of Multiprocessor Programming, Revised Reprint , 2012 .

[20]  Michel Raynal,et al.  A Contention-Friendly Binary Search Tree , 2013, Euro-Par.

[21]  Kunle Olukotun,et al.  A practical concurrent binary search tree , 2010, PPoPP '10.

[22]  Eran Yahav,et al.  Practical concurrent binary search trees via logical ordering , 2014, PPoPP '14.

[23]  Maged M. Michael,et al.  High performance dynamic lock-free hash tables and list-based sets , 2002, SPAA '02.

[24]  Faith Ellen,et al.  The amortized complexity of non-blocking binary search trees , 2014, PODC '14.

[25]  Haim Kaplan,et al.  CBTree: A Practical Concurrent Self-Adjusting Search Tree , 2012, DISC.

[26]  Hagit Attiya,et al.  Concurrent updates with RCU: search tree as an example , 2014, PODC '14.

[27]  Keir Fraser,et al.  Practical lock-freedom , 2003 .