99632a7329035376d2d70fb897e4ae7c20bb883a
[libcds.git] / readme.md
1 CDS C++ library\r
2 ===============\r
3 \r
4 The Concurrent Data Structures (CDS) library is a collection of concurrent data structures \r
5 that don't require external (manual) synchronization, and safe memory reclamation (SMR) \r
6 algorithms like Hazard Pointer and user-space RCU. CDS is mostly header-only template library. \r
7 Only SMR core implementation is segregated to .so (or .dll) file.\r
8 \r
9 The library contains the implementations of the following containers:\r
10   - lock-free stack with optional elimination support\r
11   - several algo for lock-free queue, including classic Michael & Scott algorithm and it's derivatives,\r
12     flat combining queue, segmented queue.\r
13   - several implementation of unordered set/map - lock-free and fine-grained lock-based\r
14   - lock-free skip-list\r
15   \r
16 Generally, each container has an intrusive and non-intrusive (STL-like) version belonging to \r
17 cds::intrusive and cds::container namespace respectively.\r
18 \r
19 Version 2.x of the library is written on C++11 and can be compiled by GCC 4.8+, clang 3.3+, Intel C++ 15+, \r
20 and MS VC++ 12 (2013) Update 4.\r
21 \r
22 Download the latest release from http://sourceforge.net/projects/libcds/files/.\r
23 \r
24 References\r
25 ----------\r
26 Stack\r
27   - TreiberStack: [1986] R. K. Treiber. Systems programming: Coping with parallelism. Technical Report RJ 5118, IBM Almaden Research Center, April 1986.\r
28   - Elimination back-off implementation is based on idea from [2004] Danny Hendler, Nir Shavit, Lena Yerushalmi "A Scalable Lock-free Stack Algorithm"\r
29         \r
30 Queue\r
31     - BasketQueue: [2007] Moshe Hoffman, Ori Shalev, Nir Shavit "The Baskets Queue"\r
32     - MSQueue:\r
33         * [1998] Maged Michael, Michael Scott "Simple, fast, and practical non-blocking and blocking concurrent queue algorithms"\r
34         * [2002] Maged M.Michael "Safe memory reclamation for dynamic lock-free objects using atomic reads and writes"\r
35         * [2003] Maged M.Michael "Hazard Pointers: Safe memory reclamation for lock-free objects"\r
36     - RWQueue: [1998] Maged Michael, Michael Scott "Simple, fast, and practical non-blocking and blocking concurrent queue algorithms"\r
37     - MoirQueue: [2000] Simon Doherty, Lindsay Groves, Victor Luchangco, Mark Moir "Formal Verification of a practical lock-free queue algorithm"\r
38     - OptimisticQueue: [2008] Edya Ladan-Mozes, Nir Shavit "An Optimistic Approach to Lock-Free FIFO Queues"\r
39     - SegmentedQueue: [2010] Afek, Korland, Yanovsky "Quasi-Linearizability: relaxed consistency for improved concurrency"\r
40     - TsigasCycleQueue: [2000] Philippas Tsigas, Yi Zhang "A Simple, Fast and Scalable Non-Blocking Concurrent FIFO Queue for Shared Memory Multiprocessor Systems"\r
41     - VyukovMPMCCycleQueue Dmitry Vyukov (see http://www.1024cores.net)\r
42 \r
43 Deque\r
44     - MichaelDeque: [2003] Maged Michael "CAS-based Lock-free Algorithm for Shared Deque"\r
45 \r
46 Map, set\r
47     - MichaelHashMap: [2002] Maged Michael "High performance dynamic lock-free hash tables and list-based sets"\r
48     - SplitOrderedList: [2003] Ori Shalev, Nir Shavit "Split-Ordered Lists - Lock-free Resizable Hash Tables"\r
49     - StripedMap, StripedSet: [2008] Maurice Herlihy, Nir Shavit "The Art of Multiprocessor Programming"\r
50     - CuckooMap, CuckooSet: [2008] Maurice Herlihy, Nir Shavit "The Art of Multiprocessor Programming"\r
51     - SkipListMap, SkipListSet: [2008] Maurice Herlihy, Nir Shavit "The Art of Multiprocessor Programming"\r
52         \r
53 Ordered single-linked list\r
54     - LazyList: [2005] Steve Heller, Maurice Herlihy, Victor Luchangco, Mark Moir, William N. Scherer III, and Nir Shavit "A Lazy Concurrent List-Based Set Algorithm"\r
55     - MichaelList: [2002] Maged Michael "High performance dynamic lock-free hash tables and list-based sets"\r
56 \r
57 Priority queue\r
58     - MSPriorityQueue: [1996] G.Hunt, M.Michael, S. Parthasarathy, M.Scott "An efficient algorithm for concurrent priority queue heaps"\r
59 \r
60 Tree\r
61     - EllenBinTree: [2010] F.Ellen, P.Fatourou, E.Ruppert, F.van Breugel "Non-blocking Binary Search Tree"\r
62 \r
63 Garbage collection\r
64     - Hazard Pointers\r
65         * [2002] Maged M.Michael "Safe memory reclamation for dynamic lock-freeobjects using atomic reads and writes"\r
66         * [2003] Maged M.Michael "Hazard Pointers: Safe memory reclamation for lock-free objects"\r
67         * [2004] Andrei Alexandrescy, Maged Michael "Lock-free Data Structures with Hazard Pointers"\r
68     - User-space RCU\r
69         * [2009] M.Desnoyers "Low-Impact Operating System Tracing" PhD Thesis,\r
70                  Chapter 6 "User-Level Implementations of Read-Copy Update"\r
71         * [2011] M.Desnoyers, P.McKenney, A.Stern, M.Dagenias, J.Walpole "User-Level\r
72                  Implementations of Read-Copy Update"\r
73 \r
74 Memory allocation \r
75     - [2004] M.Michael "Scalable Lock-free Dynamic Memory Allocation"\r
76 \r
77 Flat Combining technique\r
78     - [2010] Hendler, Incze, Shavit and Tzafrir "Flat Combining and the Synchronization-Parallelism Tradeoff"\r