Built-In Coloring for Highly-Concurrent Doubly-Linked Lists
This paper presents a novel approach for lock-free implementations of concurrent data structures, based on dynamically maintaining a coloring of the data structure’s items. Roughly speaking, the data structure’s operations are implemented by acquiring virtual locks on several items of the data structure and then making the changes atomically; this simplifies the design and provides clean functionality. The virtual locks are managed with cas or dcas primitives, and helping is used to guarantee progress; virtual locks are acquired according to a coloring order that decreases the length of waiting chains and increases concurrency. Coming back full circle, the legality of the coloring is preserved by having operations correctly update the colors of the items they modify.
The benefits of the scheme are demonstrated with new nonblocking implementations of doubly-linked list data structures: A dcas-based implementation of a doubly-linked list allowing insertions and removals anywhere, and cas-based implementations in which removals are allowed only at the ends of the list (insertions can occur anywhere).
The implementations possess several attractive features: they do not bound the list size, they do not leave accessible chains of garbage nodes, and they allow operations to proceed concurrently, without interfering with each other, if they are applied to non-adjacent nodes in the list.
KeywordsSource Node Data Item Memory Location Step Complexity Concurrent Operation
Unable to display preview. Download preview PDF.
- 1.Afek, Y., Merritt, M., Taubenfeld, G., Touitou, D.: Disentangling multi-object operations. In: PODC 1997, pp. 111–120 (1997)Google Scholar
- 5.Attiya, H., Hillel, E.: Built-in coloring for highly-concurrent doubly-linked lists (2006), Available from, http://www.cs.technion.ac.il/~hagit/publications/
- 7.Barnes, G.: A method for implementing lock-free shared-data structures. In: SPAA 1993, pp. 261–270 (1993)Google Scholar
- 9.Doherty, S., Detlefs, D., Grove, L., Flood, C.H., Luchangco, V., Martin, P., Moir, M., Shavit, N., Steele Jr., G.L.: DCAS is not a silver bullet for nonblocking algorithm design. In: SPAA 2004, pp. 216–224 (2004)Google Scholar
- 11.Greenwald, M.: Non-Blocking Synchronization and System Design. Ph.D thesis, Stanford University (August 1999)Google Scholar
- 12.Greenwald, M.: Two-handed emulation: how to build non-blocking implementations of complex data-structures using DCAS. In: PODC 2002, pp. 260–269 (2002)Google Scholar
- 13.Harris, T., Fraser, K.: Language support for lightweight transactions. In: OOPSLA 2003, pp. 388–402 (2003)Google Scholar
- 16.Herlihy, M., Luchangco, V., Moir, M.: Obstruction-free synchronization: Double-ended queues as an example. In: ICDCS 2003, pp. 522–529 (2003)Google Scholar
- 18.IBM. IBM System/370 Extended Architecture, Principle of Operation, 1983. IBM Publication No. SA22-7085 (1983)Google Scholar
- 19.Israeli, A., Rappoport, L.: Disjoint-access-parallel implementations of strong shared memory primitives. In: PODC 1994, pp. 151–160 (1994)Google Scholar
- 23.Sundell, H.: Efficient and Practical Non-Blocking Data Structures. Ph.D thesis, Chalmers University of Technology (2004)Google Scholar
- 25.Turek, J., Shasha, D., Prakash, S.: Locking without blocking: making lock based concurrent data structure algorithms nonblocking. In: PODS 1992, pp. 212–222 (1992)Google Scholar