paperbot · PL 论文追踪

全部论文 待读 收藏

P2 A tree clock data structure for causal orderings in concurrent executions

并发执行中因果序的树时钟数据结构
ASPLOS Proceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems2022匹配度 2/10 · 本文研究并发程序动态分析中的因果序数据结构(树时钟),属于程序分析与并发验证方向,但用户当前核心关注的是 LLM/Agent 与静态分析、浮点程序分析及贝叶斯程序分析的交叉,本文未涉及这些主题。仅在通用程序分析基础数据结构层面有间接关联。引用 19 inbox
Umang Mathur, Andreas Pavlogiannis, Hünkar Can Tunç, Mahesh Viswanathan
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出树时钟替代向量时钟计算并发执行的因果序,使 join/copy 代价与修改条目数成正比,并证明其在 happens-before 下的渐进最优性。

动态并发分析通常关注单次程序执行来检测错误,其中关键一步是定义事件间的因果序,而经典做法是用向量时钟存储各线程的逻辑时间。向量时钟的 join 与 copy 操作需 Θ(k) 时间(k 为线程数),线程多时成为计算瓶颈。本文提出树时钟这一新数据结构来替代向量时钟,其 join 与 copy 的时间大致正比于实际被修改的条目数,从而避免每次应用的 Θ(k) 固有开销。作者证明:在计算经典 happens-before(HB)偏序时树时钟是渐进最优的,即不存在能带来更小渐进运行时间的数据结构;并展示树时钟还可计算 schedulable-happens-before(SHB)与标准 Mazurkiewicz(MAZ)等偏序,因而具有通用性。实验表明,仅将向量时钟替换为树时钟,即可在基准上平均获得 MAZ 2.02 倍、SHB 2.66 倍、HB 2.97 倍的加速,显示其有望成为并发分析中的标准数据结构。

问题
动态并发分析中常用向量时钟定义事件间的因果序,但其 join 与 copy 操作需要 Θ(k) 时间(k 为线程数),线程规模大时成为瓶颈。
方法
提出树时钟数据结构,使 join 与 copy 的时间大致正比于被修改的条目数;证明其在 happens-before 偏序计算上的渐进最优性,并扩展至 SHB 与 MAZ 等其他偏序。
评估
通过基准实验将树时钟与向量时钟对比,平均加速分别为 MAZ 2.02 倍、SHB 2.66 倍、HB 2.97 倍。
原文摘要(Abstract)

Dynamic techniques are a scalable and effective way to analyze concurrent programs. Instead of analyzing all behaviors of a program, these techniques detect errors by focusing on a single program execution. Often a crucial step in these techniques is to define a causal ordering between events in the execution, which is then computed using vector clocks, a simple data structure that stores logical times of threads. The two basic operations of vector clocks, namely join and copy, require Θ(k) time, where k is the number of threads. Thus they are a computational bottleneck when k is large. In this work, we introduce tree clocks, a new data structure that replaces vector clocks for computing causal orderings in program executions. Joining and copying tree clocks takes time that is roughly proportional to the number of entries being modified, and hence the two operations do not suffer the a-priori Θ(k) cost per application. We show that when used to compute the classic happens-before (HB) partial order, tree clocks are optimal, in the sense that no other data structure can lead to smaller asymptotic running time. Moreover, we demonstrate that tree clocks can be used to compute other partial orders, such as schedulable-happens-before (SHB) and the standard Mazurkiewicz (MAZ) partial order, and thus are a versatile data structure. Our experiments show that just by replacing vector clocks with tree clocks, the computation becomes from 2.02 × faster (MAZ) to 2.66 × (SHB) and 2.97 × (HB) on average per benchmark. These results illustrate that tree clocks have the potential to become a standard data structure with wide applications in concurrent analyses.

链接与引用

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

BibTeX
@inproceedings{0001PT022,
  title = {A tree clock data structure for causal orderings in concurrent executions},
  author = {Umang Mathur and Andreas Pavlogiannis and Hünkar Can Tunç and Mahesh Viswanathan},
  booktitle = {ASPLOS},
  year = {2022},
  doi = {10.1145/3503222.3507734}
}