CAS-Based Lock-Free Algorithm for Shared Deques
This paper presents the first lock-free algorithm for shared double-ended queues (deques) based on the single-address atomic primitives CAS (Compare-and-Swap) or LL/SC (Load-Linked and Store-Conditional). The algorithm can use single-word primitives, if the maximum deque size is static. To allow the deque’s size to be dynamic, the algorithm employs single-address double-width primitives. Prior lock-free algorithms for shared deques depend on the strong DCAS (Double-Compare-and-Swap) atomic primitive, not supported on most processor architectures. The new algorithm offers significant advantages over prior lock-free shared deque algorithms with respect to performance and the strength of required primitives. In turn, lock-free algorithms provide significant reliability and performance advantages over lock-based implementations.
KeywordsAnchor Pointer Memory Management Linearization Point Atomic Block Software Transactional Memory
Unable to display preview. Download preview PDF.
- 1.Agesen, O., Detlefs, D.L., Flood, C.H., Garthwaite, A.T., Martin, P., Shavit, N.N., Steele Jr., G.L.: DCAS-based concurrent deques. In: Proceedings of the 12th Annual ACM Symposium on Parallel Algorithms and Architectures, July 2000, pp. 137–146 (2000)Google Scholar
- 2.Arora, N.S., Blumofe, R.D., Plaxton, C.G.: Thread scheduling for multiprogrammed multiprocessors. In: Proceedings of the 10th Annual ACM Symposium on Parallel Algorithms and Architectures, June 1998, pp. 119–129 (1998)Google Scholar
- 5.Greenwald, M.B.: Non-Blocking Synchronization and System Design. PhD thesis, Stanford University (August 1999)Google Scholar
- 7.Hendler, D., Shavit, N.: Non-blocking steal-half work queues. In: Proceedings of the 21st Annual ACM Symposium on Principles of Distributed Computing, July 2002, pp. 280–289 (2002)Google Scholar
- 9.IBM. IBM System/370 Extended Architecture, Principles of Operation, Publication No. SA22-7085 (1983)Google Scholar
- 10.Israeli, A., Rappoport, L.: Disjoint-access-parallel implementations of strong shared memory primitives. In: Proceedings of the 13th Annual ACM Symposium on Principles of Distributed Computing, August 1994, pp. 151–160 (1994)Google Scholar
- 12.Michael, M.M.: High performance dynamic lock-free hash tables and list-based sets. In: Proceedings of the 14th Annual ACM Symposium on Parallel Algorithms and Architectures, August 2002, pp. 73–82 (2002)Google Scholar
- 13.Michael, M.M.: Safe memory reclamation for dynamic lock-free objects using atomic reads and writes. In: Proceedings of the 21st Annual ACM Symposium on Principles of Distributed Computing, July 2002, pp. 21–30 (2002)Google Scholar
- 14.Michael, M.M., Scott, M.L.: Simple, fast, and practical non-blocking and blocking concurrent queue algorithms. In: Proceedings of the 15th Annual ACM Symposium on Principles of Distributed Computing, May 1996, pp. 267–275 (1996)Google Scholar
- 16.Shalev, O., Shavit, N.: Split-ordered lists: Lock-free extensible hash tables. In: Proceedings of the 22nd Annual ACM Symposium on Principles of Distributed Computing (July 2003)Google Scholar
- 18.Sundell, H., Tsigas, P.: Fast and lock-free concurrent priority queues for multi-thread systems. In: Proceedings of the 17th International Parallel and Distributed Processing Symposium (April 2003)Google Scholar
- 19.Valois, J.D.: Implementing lock-free queues. In: Proceedings of the Seventh International Conference on Parallel and Distributed Computing Systems, October 1994, pp. 64–69 (1994)Google Scholar