Concurrent data structures

February 25, 2019 · View on GitHub

This repository contains a compilation of the available concurrent data structures on the web that support at least lock-free or wait-free properties. Some lock-based fine-grained synchronization approaches, that are competitive with lock-free approaches, are also considered. If you know or own an implementation of a concurrent data structure, feel free to add it to the list.

CategoryNamePropertiesLanguageSource
StackStacklock-freeCLiblfds
StackStacklock-freeC++Boost
StackStacklock-freeAdaNBAda
StackTrieber Stacklock-free (based on Treiber's stack algorithm)C++cds
StackFCStacklock-free, based on paper [2010] "Flat Combining and the Synchronization-Parallelism Tradeoff"C++cds
QueueQueuelock-freeCLiblfds
QueueQueuelock-free multi-produced/multi-consumer queueC++Boost
QueueQueuelock-free queue of bounded and dynamic sizeAdaNBAda
QueueDequeslock-free deques of dynamic sizeAdaNBAda
QueueBounded Queuelock-freeCLiblfds
QueuePriority Queuelock-free priority queues of dynamic sizeAdaNBAda
QueueBasket Queuebasket lock-free queue (non-intrusive variant)C++cds
QueueMSQueueMichael & Scott lock-free queueC++cds
QueueRWQueueMichael & Scott blocking queue with fine-grained synchronization schemaC++cds
QueueMoirQueuevariation of Michael & Scott's lock-free queueC++cds
QueueOptimistic Queuelock-free, based on paper [2008] Edya Ladan-Mozes, Nir Shavit "An Optimistic Approach to Lock-Free FIFO Queues"C++cds
QueueSegmented Queuebased on paper [2010] Afek, Korland, Yanovsky "Quasi-Linearizability: relaxed consistency for improved concurrency"C++cds
QueueFCQueueFlat combining queue based on paper by Hendler, Incze, Shavit and Tzafrir [2010] "Flat Combining and the Synchronization-Parallelism Tradeoff"C++cds
QueueTsigas Cycle Queuenon-intrusive implementation of Tsigas & Zhang cyclic queue basedC++cds
QueueVyukov MPMC Cycle Queuemulti-producer multi-consumer (MPMC), array-based, fails on overflow, does not require GC, w/o priorities, causal FIFO, blocking producers and consumers queue. The algorithm is pretty simple and fast. It's not lock-free in the official meaning, just implemented by means of atomic RMW operations w/o mutexes.C++cds
QueueRingbuffer (circular queue)lock-freeCLiblfds
QueueRingbuffer (circular queue)lock-free multi-produced/multi-consumer queueC++Boost
ListLinkedListlock-freeC++Lawrence Bush
ListFree Listlock-freeCLiblfds
ListSingle LinkedList (ordered)lock-freeCLiblfds
ListLazy List, Single LinkedList (ordered)based on an optimistic locking scheme for inserts and removes, eliminating the need to use the equivalent of an atomically markable reference. Based on paper [2005] Steve Heller, Maurice Herlihy, Victor Luchangco, Mark Moir, William N. Scherer III, and Nir Shavit "A Lazy Concurrent List-Based Set Algorithm"C++cds
ListMichael List, Single LinkedList (ordered)based on paper [2002] Maged Michael "High performance dynamic lock-free hash tables and list-based sets"C++cds
ListSingle LinkedList (unordered)lock-freeCLiblfds
MapHashMaplock-freeCLiblfds
MapSpllited Ordered List Mapbased on split-ordered list algorithm discovered by Ori Shalev and Nir Shavit, see [2003] Ori Shalev, Nir Shavit "Split-Ordered Lists - Lock-free Resizable Hash Tables" and [2008] Nir Shavit "The Art of Multiprocessor Programming"C++cds
MapStripped Mapstriped hash map based on lock striping technique by [2008] Maurice Herlihy, Nir Shavit "The Art of Multiprocessor Programming"C++cds
MapMichael HashMapbased on lock'free ordered list by [2002] Maged Michael "High performance dynamic lock-free hash tables and list-based sets"C++cds
MapSkip List Maplock-free variant of skip-list implemented according to book [2008] M.Herlihy, N.Shavit "The Art of Multiprocessor Programming", chapter 14.4 "A Lock-Free Concurrent Skiplist"C++cds
MapFeldman Hashmaphash map based on multi-level array. Based on paper [2013] Steven Feldman, Pierre LaBorde, Damian Dechev "Concurrent Multi-level Arrays: Wait-free Extensible Hash Maps"C++cds
MapHashMapJavaOracle
MapMapScalaRoot package
MapCuckoo MapC++cds
MapFast Concurrent Memoization MapFast Concurrent Memoization Map (fcmm) is an almost lock-free concurrent hashmap written in C++11 to be used for memoization in concurrent environments.C++fcmm
MapJunctionJunction is a library of concurrent data structures in C++. It contains several hash map implementations.C++junction
TreeBinary Treelock-freeCLiblfds
TreeBinary Treenon-blocking BST (external)[paper (2010)] (http://dl.acm.org/citation.cfm?id=1835736)
TreeEllen's Binary TreeC++cds
TreeNatarajan's Binary Search Treelock-free BST (external)paper (2014)
TreeHowley's Binary Search Treenon-blocking internal BSTpaper (2012)
TreeRamachandran's Binary Search Treelock-free internal BSTC++paper (2015)
TreeSuffix TreeLookups are lock-free. Write operations are blockingJavaConcurrent Suffix Trees
TreeRadix TreeLookups are lock-free. Write operations are blockingJavaConcurrent Suffix Trees
TreeB TreeCB-tree project
TreeRed Black TreeCUniversity of Cambridge
TreeRed Black TreeWait-free red black treepaper
TreeBronson AVL TreeC++cds
TreeTrieScalaRoot package
TreeHeapC++cds
SetCuckoo SetCuckoo hash map based on papers [2007] M.Herlihy, N.Shavit, M.Tzafrir "Concurrent Cuckoo Hashing. Technical report" and [2008] Maurice Herlihy, Nir Shavit "The Art of Multiprocessor Programming"C++cds
SetStripped SetStriped hash set based on approach proposed in [2008] Maurice Herlihy, Nir Shavit "The Art of Multiprocessor Programming"C++cds
SetFeldman Hash Sethash set based on multi-level array. Based on approached proposed in [2013] Steven Feldman, Pierre LaBorde, Damian Dechev "Concurrent Multi-level Arrays: Wait-free Extensible Hash Maps"C++cds
SetSkip List Setlock-free variant of skip-list implemented according to book [2008] M.Herlihy, N.Shavit "The Art of Multiprocessor Programming", chapter 14.4 "A Lock-Free Concurrent Skiplist"C++cds
SetSetslock-free sets of dynamic sizeAdaNBAda
Ring BufferRing BufferLock-free multi-producer single-consumer (MPSC) ring bufferC++rmind/ringbuf
Container libraryTervelWait-freeC++Tervel

Contributors

  • Joel Fuentes
  • Chien-Hao Chen
  • Matías Bustos
  • Simon Giesecke