A scalable, portable, and memory-efficient lock-free FIFO queue

Research output: Chapter in Book/Report/Conference proceedingConference contribution

3 Scopus citations

Abstract

We present a new lock-free multiple-producer and multiple-consumer (MPMC) FIFO queue design which is scalable and, unlike existing high-performant queues, very memory efficient. Moreover, the design is ABA safe and does not require any external memory allocators or safe memory reclamation techniques, typically needed by other scalable designs. In fact, this queue itself can be leveraged for object allocation and reclamation, as in data pools. We use FAA (fetch-and-add), a specialized and more scalable than CAS (compare-and-set) instruction, on the most contended hot spots of the algorithm. However, unlike prior attempts with FAA, our queue is both lock-free and linearizable. We propose a general approach, SCQ, for bounded queues. This approach can easily be extended to support unbounded FIFO queues which can store an arbitrary number of elements. SCQ is portable across virtually all existing architectures and flexible enough for a wide variety of uses. We measure the performance of our algorithm on the x86-64 and PowerPC architectures. Our evaluation validates that our queue has exceptional memory efficiency compared to other algorithms and its performance is often comparable to, or exceeding that of state-of-the-art scalable algorithms.

Original languageEnglish (US)
Title of host publication33rd International Symposium on Distributed Computing, DISC 2019
EditorsJukka Suomela
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
ISBN (Electronic)9783959771269
DOIs
StatePublished - Oct 2019
Event33rd International Symposium on Distributed Computing, DISC 2019 - Budapest, Hungary
Duration: Oct 14 2019Oct 18 2019

Publication series

NameLeibniz International Proceedings in Informatics, LIPIcs
Volume146
ISSN (Print)1868-8969

Conference

Conference33rd International Symposium on Distributed Computing, DISC 2019
Country/TerritoryHungary
CityBudapest
Period10/14/1910/18/19

All Science Journal Classification (ASJC) codes

  • Software

Cite this