Obstruction-Free Synchronization: Double-Ended Queues as an Example

  • Authors:
  • Maurice Herlihy;Victor Luchangco;Mark Moir

  • Affiliations:
  • -;-;-

  • Venue:
  • ICDCS '03 Proceedings of the 23rd International Conference on Distributed Computing Systems
  • Year:
  • 2003

Quantified Score

Hi-index 0.02

Visualization

Abstract

We introduce obstruction-freedom, a new nonblockingproperty for shared data structure implementations. Thisproperty is strong enough to avoid the problems associatedwith locks, but it is weaker than previous nonblockingproperties-specifically lock-freedom and wait-freedom-allowing greater flexibility in the design of efficient implementations.Obstruction-freedom admits substantially simplerimplementations, and we believe that in practice itprovides the benefits of wait-free and lock-free implementations.To illustrate the benefits of obstruction-freedom, wepresent two obstruction-free CAS-based implementations ofdouble-ended queues (deques); the first is implemented on alinear array, the second on a circular array. To our knowledge,all previous nonblocking deque implementations arebased on unrealistic assumptions about hardware supportfor synchronization, have restricted functionality, or haveoperations that interfere with operations at the opposite endof the deque even when the deque has many elements init. Our obstruction-free implementations have none of thesedrawbacks, and thus suggest that it is much easier to designobstruction-free implementations than lock-free and wait-freeones. We also briefly discuss other obstruction-freedata structures and operations that we have implemented.