The SprayList: a scalable relaxed priority queue

High-performance concurrent priority queues are essential for applications such as task scheduling and discrete event simulation. Unfortunately, even the best performing implementations do not scale past a number of threads in the single digits. This is because of the sequential bottleneck in accessing the elements at the head of the queue in order to perform a DeleteMin operation. In this paper, we present the SprayList, a scalable priority queue with relaxed ordering semantics. Starting from a non-blocking SkipList, the main innovation behind our design is that the DeleteMin operations avoid a sequential bottleneck by ``spraying'' themselves onto the head of the SkipList list in a coordinated fashion. The spraying is implemented using a carefully designed random walk, so that DeleteMin returns an element among the first O(p log^3 p) in the list, with high probability, where p is the number of threads. We prove that the running time of a DeleteMin operation is O(log^3 p), with high probability, independent of the size of the list. Our experiments show that the relaxed semantics allow the data structure to scale for high thread counts, comparable to a classic unordered SkipList. Furthermore, we observe that, for reasonably parallel workloads, the scalability benefits of relaxation considerably outweigh the additional work due to out-of-order execution.

[1]  Dan Alistarh,et al.  The SprayList : a scalable relaxed priority queue Citation , 2014 .

[2]  Maurice Herlihy,et al.  The Adaptive Priority Queue with Elimination and Combining , 2014, DISC.

[3]  William Pugh,et al.  Concurrent maintenance of skip lists , 1990 .

[4]  Erez Petrank,et al.  A lock-free B+tree , 2012, SPAA '12.

[5]  William Pugh,et al.  Skip Lists: A Probabilistic Alternative to Balanced Trees , 1989, WADS.

[6]  Maurice Herlihy,et al.  The art of multiprocessor programming , 2020, PODC '06.

[7]  RaynalMichel,et al.  A speculation-friendly binary search tree , 2012 .

[8]  Jesper Larsson Träff,et al.  The lock-free k-LSM relaxed priority queue , 2015, PPOPP.

[9]  Idit Keidar,et al.  CAFÉ: Scalable Task Pools with Adjustable Fairness and Contention , 2011, DISC.

[10]  Jesper Larsson Träff,et al.  A Parallel Priority Queue with Constant Time Operations , 1998, J. Parallel Distributed Comput..

[11]  Xin-She Yang,et al.  Introduction to Algorithms , 2021, Nature-Inspired Optimization Algorithms.

[12]  Jesper Larsson Träff,et al.  Data structures for task-based priority scheduling , 2013, PPoPP '14.

[13]  Richard M. Karp,et al.  Randomized parallel algorithms for backtrack search and branch-and-bound computation , 1993, JACM.

[14]  Clifford Stein,et al.  Introduction to Algorithms, 2nd edition. , 2001 .

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

[16]  Mark Moir,et al.  Scalable statistics counters , 2013, PPoPP '13.

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

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

[19]  Yehuda Afek,et al.  Fast and scalable rendezvousing , 2013, Distributed Computing.

[20]  Andreas Hellander,et al.  URDME: a modular framework for stochastic simulation of reaction-transport processes in complex geometries , 2012, BMC Systems Biology.

[21]  Keir Fraser,et al.  Practical lock-freedom , 2003 .

[22]  Bengt Jonsson,et al.  A Skiplist-Based Concurrent Priority Queue with Minimal Memory Contention , 2013, OPODIS.

[23]  Nir Shavit,et al.  Skiplist-based concurrent priority queues , 2000, Proceedings 14th International Parallel and Distributed Processing Symposium. IPDPS 2000.

[24]  Philippas Tsigas,et al.  Fast and lock-free concurrent priority queues for multi-thread systems , 2005, J. Parallel Distributed Comput..

[25]  Michel Raynal,et al.  A speculation‐friendly binary search tree , 2012, PPoPP '12.

[26]  Narsingh Deo,et al.  Parallel heap: An optimal parallel priority queue , 2004, The Journal of Supercomputing.

[27]  Maurice Herlihy,et al.  Hopscotch Hashing , 2008, DISC.

[28]  Timothy L. Harris,et al.  A Pragmatic Implementation of Non-blocking Linked-Lists , 2001, DISC.

[29]  Peter Sanders,et al.  Randomized Priority Queues for Fast Parallel Access , 1998, J. Parallel Distributed Comput..

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

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

[32]  Dan Alistarh,et al.  The Complexity of Renaming , 2011, 2011 IEEE 52nd Annual Symposium on Foundations of Computer Science.

[33]  Ronald L. Rivest,et al.  Introduction to Algorithms , 1990 .