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

同步反转数据竞争的乐观预测

Optimistic Prediction of Synchronization-Reversal Data Races

Zheng Shi, Umang Mathur, Andreas Pavlogiannis

AI总结:

本文提出乐观同步反转竞争这一新类别及最优算法OSR,可在二次时间内可靠检测此前可处理技术无法发现的非平凡数据竞争,并在基准测试中报告最多竞争且扩展性良好。

摘要:

动态数据竞争检测已成为在实践中确保并发软件可靠性的关键技术。然而,由于线程调度器中的非确定性,动态方法常常会遗漏数据竞争。预测性竞争检测技术通过推断可能暴露数据竞争的替代执行而不重新执行底层程序来弥补这一不足。更形式化地说,动态数据竞争预测问题问的是:给定并发程序一次执行的轨迹σ,能否对σ进行正确重排以暴露数据竞争?现有的最先进数据竞争预测技术要么无法扩展到来自真实世界并发软件的执行,要么只能暴露有限类别的数据竞争,例如那些无需反转同步操作顺序即可暴露的竞争。一般来说,通过推理同步反转来暴露数据竞争是一个难解问题。在这项工作中,我们识别出一类称为乐观同步反转(Optimistic Sync-Reversal)竞争的数据竞争,这类竞争可以以可处理的方式检测,并且通常包含先前可处理技术无法暴露的非平凡数据竞争。我们还提出了一种可靠的算法OSR,用于在总体二次时间内检测所有乐观同步反转数据竞争,并通过建立匹配的下界证明该算法是最优的。我们的实验证明了OSR在我们广泛的基准测试套件上的有效性,OSR报告了最多数量的数据竞争,并且能够很好地扩展到大型执行轨迹。

英文摘要:

Dynamic data race detection has emerged as a key technique for ensuring reliability of concurrent software in practice. However, dynamic approaches can often miss data races owing to nondeterminism in the thread scheduler. Predictive race detection techniques cater to this shortcoming by inferring alternate executions that may expose data races without re-executing the underlying program. More formally, the dynamic data race prediction problem asks, given a trace σof an execution of a concurrent program, can σbe correctly reordered to expose a data race? Existing state-of-the art techniques for data race prediction either do not scale to executions arising from real world concurrent software, or only expose a limited class of data races, such as those that can be exposed without reversing the order of synchronization operations. In general, exposing data races by reasoning about synchronization reversals is an intractable problem. In this work, we identify a class of data races, called Optimistic Sync(hronization)-Reversal races that can be detected in a tractable manner and often include non-trivial data races that cannot be exposed by prior tractable techniques. We also propose a sound algorithm OSR for detecting all optimistic sync-reversal data races in overall quadratic time, and show that the algorithm is optimal by establishing a matching lower bound. Our experiments demonstrate the effectiveness of OSR on our extensive suite of benchmarks, OSR reports the largest number of data races, and scales well to large execution traces.

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

↑