Lune

PPoPP2023顶会

The State-of-the-Art LCRQ Concurrent Queue Algorithm Does NOT Require CAS2

Raed Romanov, Nikita Koval

摘要

Concurrent queues are, arguably, one of the most important data structures in high-load applications, which require them to be extremely fast and scalable. Achieving these properties is non-trivial. The early solutions, such as the classic queue by Michael and Scott, store elements in a concurrent linked list. Reputedly, this design is non-scalable and memoryinefficient. Modern solutions utilize the Fetch-and-Add instruction to improve the algorithm's scalability and store elements in arrays to reduce the memory pressure. One of the most famous and fast such algorithms is LCRQ. The main disadvantage of its design is that it relies on the atomic CAS2 instruction, which is unavailable in most modern programming languages, such as Java, Kotlin, or Go, let alone some architectures.

This paper presents the LPRQ algorithm, a portable modification of the original LCRQ design that eliminates all CAS2 usages. In contrast, it performs the synchronization utilizing only the standard Compare-and-Swap and Fetch-and-Add atomic instructions. Our experiments show that LPRQ provides the same performance as the classic LCRQ algorithm, outrunning the fastest of the existing solutions that do not use CAS2 by up to 1.6×.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Sharded Elimination and Combining for Highly-Efficient Concurrent Stacks 引用了 Aggregating Funnels for Faster Fetch&Add and Queues
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper3

  1. Aggregating Funnels for Faster Fetch&Add and QueuesYounghun Roh, Yuanhao Wei, Eric Ruppert, Panagiota Fatourou 等PPoPP 2025 · 2 次引用
  2. Memory Bounds for Concurrent Bounded QueuesVitaly Aksenov, Nikita Koval, Petr Kuznetsov, Anton ParamonovPPoPP 2024 · 1 次引用
  3. Sharded Elimination and Combining for Highly-Efficient Concurrent StacksAjay Singh, Nikos Metaxakis, Panagiota FatourouPPoPP 2026

它引用的 Paper1

  1. Scaling concurrent queues by using HTM to profit from failed atomic operationsOr Ostrovsky, Adam MorrisonPPoPP 2020 · 6 次引用

相关 Paper

  1. Fast and Scalable Channels in Kotlin CoroutinesNikita Koval, Dan Alistarh, Roman ElizarovPPoPP 2023 · 12 次引用
  2. CQS: A Formally-Verified Framework for Fair and Abortable SynchronizationNikita Koval, Dmitry Khalanskiy, Dan AlistarhPLDI 2023 · 1 次引用
  3. BBQ: A Block-based Bounded Queue for Exchanging Data and ProfilingJiawei Wang, Diogo Behrens, Ming Fu, Lilith Oberhauser 等USENIX ATC 2022
  4. Reciprocating LocksDave Dice, Alex KoganPPoPP 2025 · 1 次引用
  5. No Rush in Executing Atomic InstructionsAshkan Asgharzadeh, Josué Feliu, Manuel E. Acacio, Stefanos Kaxiras 等HPCA 2025
黄昏的海面,两侧是细线勾勒的悬崖