arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.17818cs.PL
收藏

CSSTs:并发执行分析中用于偏序的动态数据结构

CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis

Hünkar Can Tunç, Ameya Prashant Deshmukh, Berk Çirisci, Constantin Enea, Andreas Pavlogiannis

AI总结:

本文提出集体稀疏线段树(CSSTs),用于在并发程序动态分析中高效维护事件偏序,当偏序宽度远小于轨迹规模时,可在 O(log n) 时间内完成插入、删除和查询,实验证明其优于现有数据结构。

摘要:

动态分析是分析和测试并发程序的标准方法。这类技术观察程序轨迹并对其进行分析,以推断是否存在缺陷。其核心在于,每种分析都维护一个偏序 $P$,该偏序表示被分析轨迹 $σ$ 中事件之间的顺序依赖关系。自然,分析的可扩展性在很大程度上取决于维护 $P$ 的效率。迄今为止,用于该任务的标准数据结构一直是向量时钟。然而,对于采用非流式风格的分析而言,向量时钟速度较慢,在 $P$ 中插入(并传播)每个新顺序关系需要 $O(n)$ 的时间,其中 $n$ 是 $σ$ 的大小,同时它们无法处理已有顺序关系的删除。在本文中,我们开发了集体稀疏线段树(CSSTs),这是一种简单而优雅的数据结构,用于通用地维护偏序 $P$。当 $P$ 的宽度 $k$ 远小于其定义域大小 $n$ 时,CSSTs 表现优异,能够在 $O(logn)$ 时间内完成 $P$ 中顺序关系的插入、删除和查询。对于并发轨迹,$k$ 受其线程数限制,并且通常比其大小 $n$ 小若干个数量级,这使得 CSSTs 非常适合该场景。我们的实验结果证实,CSSTs 是目前处理现有文献中一系列动态分析的最佳数据结构。

英文摘要:

Dynamic analyses are a standard approach to analyzing and testing concurrent programs. Such techniques observe program traces and analyze them to infer the presence or absence of bugs. At its core, each analysis maintains a partial order $P$ that represents order dependencies between events of the analyzed trace $σ$. Naturally, the scalability of the analysis largely depends on how efficiently it maintains $P$. The standard data structure for this task has thus far been vector clocks. These, however, are slow for analyses that follow a non-streaming style, costing $O(n)$ for inserting (and propagating) each new ordering in $P$, where $n$ is the size of $σ$, while they cannot handle the deletion of existing orderings. In this paper we develop collective sparse segment trees (CSSTs), a simple but elegant data structure for generically maintaining a partial order $P$. CSSTs thrive when the width $k$ of $P$ is much smaller than the size $n$ of its domain, allowing inserting, deleting, and querying for orderings in $P$ to run in $O(logn)$ time. For a concurrent trace, $k$ is bounded by the number of its threads, and is normally orders of magnitude smaller than its size $n$, making CSSTs fitting for this setting. Our experimental results confirm that CSSTs are the best data structure currently to handle a range of dynamic analyses from existing literature.

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

↑