Lock-Free Hopscotch Hashing

In this paper we present a lock-free version of Hopscotch Hashing. Hopscotch Hashing is an open addressing algorithm originally proposed by Herlihy, Shavit, and Tzafrir, which is known for fast performance and excellent cache locality. The algorithm allows users of the table to skip or jump over irrelevant entries, allowing quick search, insertion, and removal of entries. Unlike traditional linear probing, Hopscotch Hashing is capable of operating under a high load factor, as probe counts remain small. Our lock-free version improves on both speed, cache locality, and progress guarantees of the original, being a chimera of two concurrent hash tables. We compare our data structure to various other lock-free and blocking hashing algorithms and show that its performance is in many cases superior to existing strategies. The proposed lock-free version overcomes some of the drawbacks associated with the original blocking version, leading to a substantial boost in scalability while maintaining attractive features like physical deletion or probe-chain compression.

[1]  Pierre LaBorde,et al.  Concurrent multi-level arrays: Wait-free extensible hash maps , 2013, 2013 International Conference on Embedded Computer Systems: Architectures, Modeling, and Simulation (SAMOS).

[2]  Hui Gao,et al.  Lock-free dynamic hash tables with open addressing , 2003, Distributed Computing.

[3]  K. Rustan M. Leino,et al.  A Basis for Verifying Multi-threaded Programs , 2009, ESOP.

[4]  Nhan Nguyen,et al.  Lock-Free Cuckoo Hashing , 2014, 2014 IEEE 34th International Conference on Distributed Computing Systems.

[5]  Dan Alistarh,et al.  ThreadScan: Automatic and Scalable Memory Reclamation , 2018, ACM Trans. Parallel Comput..

[6]  D. M. Hutton,et al.  The Art of Multiprocessor Programming , 2008 .

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

[8]  Soumya Edamana Mana,et al.  Split-Ordered Lists : Lock-Free Extensible Hash Tables , 2011 .

[9]  Sven Karlsson,et al.  A scalable lock-free hash table with open addressing , 2016, PPoPP.

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

[11]  Maurice Herlihy,et al.  Obstruction-free synchronization: double-ended queues as an example , 2003, 23rd International Conference on Distributed Computing Systems, 2003. Proceedings..

[12]  Maurice Herlihy,et al.  Wait-free synchronization , 1991, TOPL.

[13]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[14]  Keir Fraser,et al.  A Practical Multi-word Compare-and-Swap Operation , 2002, DISC.

[15]  R. K. Shyamasundar,et al.  Introduction to algorithms , 1996 .

[16]  Dan Alistarh,et al.  Forkscan: Conservative Memory Reclamation for Modern Operating Systems , 2017, EuroSys.

[17]  Marieke Huisman,et al.  VerCors: A Layered Approach to Practical Verification of Concurrent Software , 2016, 2016 24th Euromicro International Conference on Parallel, Distributed, and Network-Based Processing (PDP).

[18]  Timothy L. Harris,et al.  Non-blocking Hashtables with Open Addressing , 2005, DISC.

[19]  Maurice Herlihy,et al.  Hopscotch Hashing , 2008, DISC.

[20]  Erez Petrank,et al.  Efficient Memory Management for Lock-Free Data Structures with Optimistic Access , 2015, SPAA.

[21]  Maurice Herlihy,et al.  The art of multiprocessor programming , 2020, PODC '06.

[22]  Andris Padegs System/370 Extended Architecture: Design Considerations , 1983, IBM J. Res. Dev..

[23]  W. W. Peterson,et al.  Addressing for Random-Access Storage , 1957, IBM J. Res. Dev..

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