Multi-producer multi-consumer FIFO queue is one of the fundamental concurrent data structures used in software systems. A lot of progress has been done on designing concurrent bounded and unbounded queues [1--10]. As previous works show, it is extremely hard to come up with an efficient algorithm. There are two orthogonal ways to improve the performance of fair concurrent queues: reducing the number of compare-and-swap (CAS) calls, and making queues more memory-friendly by reducing the number of allocations. The most up-to-date efficient algorithms choose the first path and use more scalable fetch-and-add (FAA) instead of CAS [3, 4, 10]. For the second path, the standard way to design memory-friendly versions is to implement queues on top of arrays [2--4, 10]. For unbounded queues it is reasonable to allocate memory in chunks, constructing a linked queue on them; this approach significantly improves the performance. The bounded queues are more memory-friendly by design: they are represented as a fixed-sized array of elements even in theory. However, most of the bounded queue implementations still have issues with memory allocations --- typically, they either use descriptors [5, 8] or store some additional meta-information along with the elements [1, 6, 7, 9].
[1]
Yehuda Afek,et al.
Fast concurrent queues for x86 processors
,
2013,
PPoPP '13.
[2]
Damian Dechev,et al.
A wait-free multi-producer multi-consumer ring buffer
,
2015,
SIAP.
[3]
John M. Mellor-Crummey,et al.
A wait-free queue as fast as fetch-and-add
,
2016,
PPoPP.
[4]
Niloufar Shafiei.
Non-blocking Array-Based Algorithms for Stacks and Queues
,
2009,
ICDCN.
[5]
Yi Zhang,et al.
A simple, fast and scalable non-blocking concurrent FIFO queue for shared memory multiprocessor systems
,
2001,
SPAA '01.
[6]
Ruslan Nikolaev.
A Scalable, Portable, and Memory-Efficient Lock-Free FIFO Queue
,
2019,
DISC.
[7]
YangChaoran,et al.
A wait-free queue as fast as fetch-and-add
,
2016
.
[8]
John D. Valois.
Implementing Lock-Free Queues
,
1994
.
[9]
Peter Pirkelbauer,et al.
A Portable Lock-Free Bounded Queue
,
2016,
ICA3PP.
[10]
Philippas Tsigas,et al.
Cache-Aware Lock-Free Queues for Multiple Producers/Consumers and Weak Memory Consistency
,
2010,
OPODIS.