What Can Be Done with Consensus Number One: Relaxed Queues and Stacks

Sequentially specified linearizable concurrent data structures must be relaxed in order to support scalability. In this work, we identify and formally define relaxations of queues and stacks that can be non-blocking or wait-free implemented using only read/write operations. We use set-linearizability to specify the relaxations formally, and precisely identify the subset of executions which preserve the original sequential behavior. The relaxations allow for an item to be extracted more than once by different operations, but only in case of concurrency; we call such a property multiplicity. The stack implementation is wait-free, while the queue implementation is non-blocking. We also use interval-linearizability to describe a queue with multiplicity, with the additional and new relaxation that a dequeue operation can return weak-empty, which means that the queue might be empty. We present a read/write wait-free implementation of the interval-sequential queue. As far as we know, this work is the first that provides simple and clear formalizations of the notions of multiplicity and weak-emptiness, which can be implemented from read/write registers only.

[1]  Ana Sokolova,et al.  Quantitative relaxation of concurrent data structures , 2013, POPL.

[2]  Gadi Taubenfeld Synchronization Algorithms and Concurrent Programming , 2006 .

[3]  Adrian Colbrook,et al.  Concurrent Data Structures , 1991, ICCI.

[4]  Faith Ellen,et al.  Limited-Use Atomic Snapshots with Polylogarithmic Step Complexity , 2015, J. ACM.

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

[6]  Michel Raynal,et al.  Concurrent Programming: Algorithms, Principles, and Foundations , 2012, Springer Berlin Heidelberg.

[7]  Ana Sokolova,et al.  Distributed queues in shared memory: multicore performance and scalability through quantitative relaxation , 2013, CF '13.

[8]  Yehuda Afek,et al.  Quasi-Linearizability: Relaxed Consistency for Improved Concurrency , 2010, OPODIS.

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

[10]  Mark Moir,et al.  Wait-Free Algorithms for Fast, Long-Lived Renaming , 1995, Sci. Comput. Program..

[11]  David Eisenstat,et al.  Two-enqueuer queue in Common2 , 2008, 0805.0444.

[12]  Zongpeng Li,et al.  Non-blocking implementations of Queues in asynchronous distributed shared-memory systems , 2001 .

[13]  Yehuda Afek,et al.  A completeness theorem for a class of synchronization objects , 1993, PODC '93.

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

[15]  Dan Alistarh,et al.  Distributionally Linearizable Data Structures , 2018, SPAA.

[16]  Michel Raynal,et al.  Help When Needed, But No More: Efficient Read/Write Partial Snapshot , 2009, DISC.

[17]  Ophir Rachman,et al.  Atomic snapshots using lattice agreement , 1995, Distributed Computing.

[18]  Michel Raynal,et al.  Unifying Concurrent Objects and Distributed Tasks , 2018, J. ACM.

[19]  Peter Sanders,et al.  MultiQueues: Simple Relaxed Concurrent Priority Queues , 2015, SPAA.

[20]  Hagit Attiya,et al.  Polylogarithmic concurrent data structures from monotone circuits , 2012, JACM.

[21]  Ana Sokolova,et al.  Local Linearizability for Concurrent Container-Type Data Structures , 2016, CONCUR.

[22]  Ana Sokolova,et al.  Scalability versus semantics of concurrent FIFO queues , 2011, PODC '11.

[23]  Nir Shavit,et al.  The computability of relaxed data structures: queues and stacks as examples , 2016, Distributed Computing.

[24]  Ana Sokolova,et al.  Performance, Scalability, and Semantics of Concurrent FIFO Queues , 2012, ICA3PP.

[25]  Matei David,et al.  A Single-Enqueuer Wait-Free Queue Implementation , 2004, DISC.

[26]  Yehuda Afek,et al.  Common2 extended to stacks and unbounded concurrency , 2006, PODC '06.

[27]  Rachid Guerraoui,et al.  The complexity of obstruction-free implementations , 2009, JACM.

[28]  Danny Hendler,et al.  Nontrivial and Universal Helping for Wait-Free Queues and Stacks , 2018, OPODIS.

[29]  Keshav Pingali,et al.  A lightweight infrastructure for graph analytics , 2013, SOSP.

[30]  Hagit Attiya,et al.  Renaming in an asynchronous environment , 1990, JACM.

[31]  Faith Ellen,et al.  Restricted Stack Implementations , 2005, DISC.

[32]  Nir Shavit Data structures in the multicore age , 2011, CACM.

[33]  Michel Raynal,et al.  The renaming problem in shared memory systems: An introduction , 2011, Comput. Sci. Rev..

[34]  Dan Alistarh,et al.  The SprayList: a scalable relaxed priority queue , 2015, PPoPP.

[35]  Rachid Guerraoui,et al.  Laws of order: expensive synchronization in concurrent algorithms cannot be eliminated , 2011, POPL '11.

[36]  Jennifer L. Welch,et al.  Relaxed Data Types as Consistency Conditions , 2017, SSS.

[37]  Nir Shavit,et al.  On the Inherent Sequentiality of Concurrent Objects , 2012, SIAM J. Comput..

[38]  Maged M. Michael,et al.  A Practical, Scalable, Relaxed Priority Queue , 2019, ICPP.

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

[40]  Maged M. Michael,et al.  Idempotent work stealing , 2009, PPoPP '09.