Enhancing Concurrent Data Structures with Concurrent Iteration Operations: Consistency and Algorithms

Concurrent data structures provide the means to multi-threaded applications to share data. Data structures come with a set of predefined operations, specified by the semantics of the data structure. In the literature and in several contemporary commonly used programming environments, the notion of iterations has been introduced for collection data structures, as a bulk operation enhancing the native set of their operations. Iterations in several of these contexts are treated as sequential in nature and may freeze the data structure while operating or provide a variety of consistency guarantees when running concurrently with the native operations of the data structures. In this work we study iterations in concurrent data structures with respect to their coexistence with the native operations of the latter and the guarantees that they provide under concurrency. Besides linearizability, we propose a set of consistency specifications for such bulk operations, including also concurrency-aware properties by building on Lamport's systematic definitions for registers. By using queues, fixed-domain sets and composite registers as case-studies of underlying objects, we show a set of constructions of iteration operations, satisfying these properties. Besides the trade-off between consistency and throughput, we demonstrate the trade-off between the overhead of the bulk operation and possible support (helping) by the native operations of the data structure. We show a set of algorithms that demonstrate these and study the implications on the efficiency of the implementations.

[1]  D. M. Hutton,et al.  The Art of Multiprocessor Programming , 2008 .

[2]  Maged M. Michael Hazard pointers: safe memory reclamation for lock-free objects , 2004, IEEE Transactions on Parallel and Distributed Systems.

[3]  Maurice Herlihy,et al.  Time-Lapse Snapshots , 1992, SIAM J. Comput..

[4]  Lieven Eeckhout,et al.  Statistically rigorous java performance evaluation , 2007, OOPSLA.

[5]  Maged M. Michael,et al.  Simple, fast, and practical non-blocking and blocking concurrent queue algorithms , 1996, PODC '96.

[6]  Maurice Herlihy,et al.  Linearizability: a correctness condition for concurrent objects , 1990, TOPL.

[7]  Paul G. Spirakis,et al.  Reading Many Variables in One Atomic Operation: Solutions with Linear or Sublinear Complexity , 1994, IEEE Trans. Parallel Distributed Syst..

[8]  Martin Odersky,et al.  A Generic Parallel Collection Framework , 2011, Euro-Par.

[9]  James Noble,et al.  Iterators and encapsulation , 2000, Proceedings 33rd International Conference on Technology of Object-Oriented Languages and Systems TOOLS 33.

[10]  Martin Odersky,et al.  Concurrent tries with efficient non-blocking snapshots , 2012, PPoPP '12.

[11]  Maged M. Michael The balancing act of choosing nonblocking features , 2013, CACM.

[12]  Maurice Herlihy,et al.  Obstruction-free synchronization: double-ended queues as an example , 2003, 23rd International Conference on Distributed Computing Systems, 2003. Proceedings..

[13]  Maurice Herlihy,et al.  Wait-free synchronization , 1991, TOPL.

[14]  James H. Anderson,et al.  Multi-writer composite registers , 1994, Distributed Computing.

[15]  Maurice Herlihy,et al.  Nonblocking memory management support for dynamic-sized data structures , 2005, TOCS.

[16]  Keir Fraser,et al.  A Practical Multi-word Compare-and-Swap Operation , 2002, DISC.

[17]  Yang Zhao,et al.  Iterators can be Independent “ from ” Their Collections , 2007 .

[18]  Nir Shavit,et al.  Atomic snapshots of shared memory , 1990, JACM.

[19]  Leslie Lamport,et al.  On interprocess communication , 1986, Distributed Computing.

[20]  Faith Ellen How Hard Is It to Take a Snapshot? , 2005, SOFSEM.

[21]  Stephen M. Watt A technique for generic iteration and its optimization , 2006, WGP '06.

[22]  Leslie Lamport,et al.  How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs , 2016, IEEE Transactions on Computers.

[23]  Mark Moir,et al.  Universal Constructions for Large Objects , 1995, IEEE Trans. Parallel Distributed Syst..

[24]  Maurice Herlihy,et al.  A methodology for implementing highly concurrent data objects , 1993, TOPL.

[25]  Leslie Lamport,et al.  Interprocess Communication , 2020, Practical System Programming with C.