arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2501.02380cs.DC
收藏

往复式锁(Reciprocating Locks)

Reciprocating Locks

University of Waterloo(滑铁卢大学);Oracle Labs(甲骨文实验室)

Dave Dice, Alex Kogan

AI总结:

本研究提出一种面向缓存一致性共享内存的新型互斥锁算法Reciprocating Locks,具备常数时间到达与释放、本地自旋、防饥饿等特性,在竞争与无竞争场景下性能均优于或持平于当前最优可扩展自旋锁。

摘要:

我们提出了“往复式锁(Reciprocating Locks)”——一种面向缓存一致性共享内存(CC)的新型互斥锁算法,具备多项优良特性。该锁的门控到达阶段与释放操作均在常数时间内完成;等待线程采用本地自旋机制,且无论单个线程在同一时刻持有多少把锁,每个线程仅需一个等待元素。尽管该锁不提供严格的FIFO准入,但它限制了插队次数,且具备强防饥饿特性。该锁结构紧凑、空间高效,专门设计为可直接应用于Linux内核、pthreads或C++等现实通用计算环境。我们的实验表明,该锁在竞争场景下吞吐量高,无竞争场景下延迟低,其性能与当前最优的可扩展自旋锁相当,且往往更优。

英文摘要:

We present "Reciprocating Locks", a novel mutual exclusion locking algorithm, targeting cache-coherent shared memory (CC), that enjoys a number of desirable properties. The doorway arrival phase and the release operation both run in constant-time. Waiting threads use local spinning and only a single waiting element is required per thread, regardless of the number of locks a thread might hold at a given time. While our lock does not provide strict FIFO admission, it bounds bypass and has strong anti-starvation properties. The lock is compact, space efficient, and has been intentionally designed to be readily usable in real-world general purpose computing environments such as the linux kernel, pthreads, or C++. We show the lock exhibits high throughput under contention and low latency in the uncontended case. The performance of Reciprocating Locks is competitive with and often better than the best state-of-the-art scalable spin locks.

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

↑