We present a lock-free implementation of a dynamically sized double-ended queue (deque) that is based on the double compare-and-swap (DCAS) instruction. This implementation improves over the best previous one by allowing storage to be allocated and freed in bulk when the size of the deque changes significantly, and to avoid invocation of the storage allocator at all while the size remains relatively stable. We achieved this implementation in two steps by first solving the easier problem of implementing the deque for a garbage-collected environment, and then applying the Lock-Free Reference Counting methodology we recently proposed in order to achieve a version independent of garbage collection.
Cited By
- Sundell H and Tsigas P (2019). Lock-free deques and doubly linked lists, Journal of Parallel and Distributed Computing, 68:7, (1008-1020), Online publication date: 1-Jul-2008.
- Hendler D, Lev Y, Moir M and Shavit N (2018). A dynamic-sized nonblocking work stealing deque, Distributed Computing, 18:3, (189-207), Online publication date: 1-Feb-2006.
- Doherty S, Detlefs D, Groves L, Flood C, Luchangco V, Martin P, Moir M, Shavit N and Steele G DCAS is not a silver bullet for nonblocking algorithm design Proceedings of the sixteenth annual ACM symposium on Parallelism in algorithms and architectures, (216-224)
- Sundell H and Tsigas P Lock-free and practical doubly linked list-based deques using single-word compare-and-swap Proceedings of the 8th international conference on Principles of Distributed Systems, (240-255)
- Herlihy M, Luchangco V and Moir M Obstruction-Free Synchronization Proceedings of the 23rd International Conference on Distributed Computing Systems
Recommendations
DCAS-based concurrent deques
SPAA '00: Proceedings of the twelfth annual ACM symposium on Parallel algorithms and architecturesThe computer industry is currently examining the use of strong synchronization operations such as double compare-and-swap (DCAS) as a means of supporting non-blocking synchronization on tomorrow's multiprocessor machines. However, before such a strong ...
Even Better DCAS-Based Concurrent Deques
DISC '00: Proceedings of the 14th International Conference on Distributed ComputingThe computer industry is examining the use of strong synchronization operations such as double compare-and-swap (DCAS) as a means of supporting non-blocking synchronization on tomorrow's multiprocessor machines. However, before such a primitive will be ...
Lazy Evaluation for Concurrent OLTP and Bulk Transactions
IDEAS '16: Proceedings of the 20th International Database Engineering & Applications SymposiumExisting concurrency control systems cannot execute transactions with overlapping updates concurrently. This is especially problematic for bulk updates, which usually overlap with all concurrent transactions. To solve this, we have developed a ...