按年被提到
20222022 · 1 次2026
编程语言与编译器›Rust 与内存安全·arXiv:2201.00813 · cs.DC

Lock-Free Locks Revisited

Naama Ben-David, Guy E. Blelloch, Yuanhao Wei · 2022
开始阅读 ↗PDFalphaXiv 讨论
被提及 · 2 人首次 2022-01-27 · 最近 2023-10-25
2不同的人
2活跃月份
2讨论串
0被引(OpenAlex)
arXiv 摘要(候选层不写导读)

This paper presents a new and practical approach to lock-free locks based on helping, which allows the user to write code using fine-grained locks, but run it in a lock-free manner. Although lock-free locks have been suggested in the past, they are widely viewed as impractical, have some key limitations, and, as far as we know, have never been implemented. The paper presents some key techniques that make lock-free locks practical and more general. The most important technique is an approach to idempotence -- i.e. making code that runs multiple times appear as if it ran once. The idea is based on using a shared log among processes running the same protected code. Importantly, the approach can be library based, requiring very little if any change to standard code -- code just needs to use the idempotent versions of memory operations (load, store, LL/SC, allocation, free). We have implemented a C++ library called Flock based on the ideas. Flock allows lock-based data structures to run in either lock-free or blocking (traditional locks) mode. We implemented a variety of tree and list-based data structures with Flock and compare the performance of the lock-free and blocking modes under a variety of workloads. The lock-free mode is almost as fast as blocking mode under almost all workloads, and significantly faster when threads are oversubscribed (more threads than processors). We also compare with several existing lock-based and lock-free alternatives.

候选层:至少 2 个不同的人、在 2 个不同月份提到过,还没到主书架的 3 人 3 个月。没有做立场标注,所以只写“被提及”。

HN 书评

推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及
评论senderista · 2023-10

“Very tenuously related, but the idea of logging all nondeterministic effects for idempotence can also be used to make locks lock-free! https://arxiv.org/abs/2201.00813”

Flawless – Durable execution engine for Rust原评论 ↗
被提交为 story · 1 次