arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.14530cs.DScs.DC
收藏

在竞争下快速并发原语

Fast Concurrent Primitives Despite Contention

Stony Brook University(石溪大学);Carnegie Mellon University(卡内基梅隆大学);New York University(纽约大学);Tsinghua University(清华大学);VMware Research(VMware研究);Tel Aviv University(特拉维夫大学)

Michael A. Bender, Guy E. Blelloch, Martin Farach-Colton, Yang Hu, Rob Johnson, Rotem Oshman, Renfei Zhou

AI总结:

本文研究了在高竞争环境下构建并发对象的方法,提出了处理竞争的算法,并展示了在松散同步随机调度器下,读写寄存器和CAS寄存器的延迟为O(logP)。

摘要:

我们研究了在P个进程并行运行且通过受写竞争影响的共享内存交互的环境下构建并发对象的问题。我们的目标是将受写竞争影响的硬件原语转换为能够优雅处理竞争的原语。我们为几种基本原语提供了竞争解决算法,并在一种放松的、大致同步的随机调度器下分析了它们。具体来说,我们使用O(1)的硬件读写寄存器构造了具有O(logP)延迟的读写寄存器和CAS寄存器,在CAS构造的情况下使用一个硬件CAS寄存器。我们的算法保证了即使在由能够看到整个操作历史包括其时间和返回值的自适应对手调用操作时也能保持性能。这使得它们可以作为更大程序中的构建块;利用这种组合性属性,我们获得了其他构造(LL/SC、fetch-and-increment、有界max寄存器和计数器)。为了补充我们的构造,我们给出了一个权衡,表明即使在完全同步的调度下,即使每个进程只执行一个操作,任何实现我们考虑的任何原语的算法,使用空间M,并且在高概率下具有延迟至多L,必须有期望延迟至少Ω(log_{ML} P)。

英文摘要:

We study the problem of constructing concurrent objects in a setting where $P$ processes run in parallel and interact through a shared memory that is subject to write contention. Our goal is to transform hardware primitives that are subject to write contention into ones that handle contention gracefully. We give contention-resolution algorithms for several basic primitives, and analyze them under a relaxed, roughly-synchronous stochastic scheduler, where processes run at roughly the same rate up to a constant factor with high probability. Specifically, we construct read/write registers and CAS registers that have latency $O(\log P)$ w.h.p. under our scheduler model, using $O(1)$ hardware read/write registers and, in the case of our CAS construction, one hardware CAS register. Our algorithms guarantee performance even when their operations are invoked by an adaptive adversary that is able to see the entire history of operations so far, including their timing and return values. This allows them to be used as building blocks inside larger programs; using this compositionality property, we obtain several other constructions (LL/SC, fetch-and-increment, bounded max registers, and counters). To complement our constructions, we give a trade-off showing that even under a perfectly synchronous schedule and even if each process only executes one operation, any algorithm that implements any of the primitives that we consider, uses space $M$, and has latency at most $L$ with high probability must have expected latency at least $Ω(\log_{ML} P)$.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑