paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Concurrent Data Structures Made Easy

让并发数据结构变得简单
OOPSLA 8(OOPSLA2)2024匹配度 1/10 · 该论文研究 Multicore OCaml 中的批量并行并发数据结构与函数式编程实现,不涉及静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析,与用户研究画像几乎没有交集。引用 1 inbox
Callista Le, Kiran Gopinathan, Koon Wen Lee, Seth Gilbert, Ilya Sergey
dblp: 2026-09-10crossref: 2026-09-10arxiv: 2026-09-10

AI 速览

一句话:提出 Multicore OCaml 库 OBatcher,用隐式批处理与转换函子简化批量并行并发数据结构的设计、实现和使用。

论文关注线程安全并发数据结构在实现复杂性与吞吐量之间的两难:基于锁的结构易实现且易证明线程安全,但在多线程负载下吞吐差;无锁结构吞吐高却难以正确实现和验证。作者借助批量并行思想,提出 Multicore OCaml 库 OBatcher:一方面设计轻量级隐式批处理,基于通用异步编程机制让用户无需显式分组操作;另一方面总结将常见顺序结构转换为高效批量并行结构的一系列策略,并以函子形式提供。评估使用多种基准和大规模异步工作负载,结果表明这些实现持续优于对应的粗粒度锁实现,且吞吐量能随处理器数量合理扩展。

问题
如何让并发数据结构同时具备基于锁实现的简单性与高吞吐量,避免锁实现吞吐差、无锁实现难以正确实现和验证的问题。
方法
基于批量并行思想,提出 Multicore OCaml 库 OBatcher,提供轻量级隐式批处理,并通过函子封装将常见顺序结构转换为高效批量并行结构的策略。
评估
在多种基准和大规模异步工作负载上评估,比较其与粗粒度锁实现的吞吐量,并考察吞吐量随处理器数量的扩展性。
原文摘要(Abstract)

Design of an efficient thread-safe concurrent data structure is a balancing act between its implementation complexity and performance. Lock-based concurrent data structures, which are relatively easy to derive from their sequential counterparts and to prove thread-safe, suffer from poor throughput under even light multi-threaded workload. At the same time, lock-free concurrent structures allow for high throughput, but are notoriously difficult to get right and require careful reasoning to formally establish their correctness. In this work, we explore a solution to this conundrum based on a relatively old idea of batch parallelism —an approach for designing high-throughput concurrent data structures via a simple insight: efficiently processing a batch of a priori known operations in parallel is easier than optimising performance for a stream of arbitrary asynchronous requests. Alas, batch-parallel structures have not seen wide practical adoption due to (i ) the inconvenience of having to structure multi-threaded programs to explicitly group operations and (ii) the lack of a systematic methodology to implement batch-parallel structures as simply as lock-based ones. We present OB atcher —a Multicore OCaml library that streamlines the design, implementation, and usage of batch-parallel structures. It solves the first challenge (how to use) by suggesting a new lightweight implicit batching design that is built on top of generic asynchronous programming mechanisms. The second challenge (how to implement) is addressed by identifying a family of strategies for converting common sequential structures into efficient batch-parallel ones, and by providing functors that embody those strategies. We showcase OBatcher with a diverse set of benchmarks. Our evaluation of all the implementations on large asynchronous workloads shows that (a) they consistently outperform the corresponding coarse-grained lock-based implementations and that (b) their throughput scales reasonably with the number of processors.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@article{abs-2408-13779,
  title = {Concurrent Data Structures Made Easy},
  author = {Callista Le and Kiran Gopinathan and Koon Wen Lee and Seth Gilbert and Ilya Sergey},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {OOPSLA2},
  year = {2024},
  doi = {10.1145/3689775}
}