Lune

POPL2021顶会

Optimal prediction of synchronization-preserving races

Umang Mathur, Andreas Pavlogiannis, Mahesh Viswanathan

2021年份
36被引次数
17顶会引用

摘要

Concurrent programs are notoriously hard to write correctly, as scheduling nondeterminism introduces subtle errors that are both hard to detect and to reproduce. The most common concurrency errors are (data) races, which occur when memory-conflicting actions are executed concurrently. Consequently, considerable effort has been made towards developing efficient techniques for race detection. The most common approach is dynamic race prediction: given an observed, race-free trace 𝜎 of a concurrent program, the task is to decide whether events of 𝜎 can be correctly reordered to a trace 𝜎 * that witnesses a race hidden in 𝜎.

In this work we introduce the notion of sync(hronization)-preserving races. A sync-preserving race occurs in 𝜎 when there is a witness 𝜎 * in which synchronization operations (e.g., acquisition and release of locks) appear in the same order as in 𝜎. This is a broad definition that strictly subsumes the famous notion of happens-before races. Our main results are as follows. First, we develop a sound and complete algorithm for predicting sync-preserving races. For moderate values of parameters like the number of threads, the algorithm runs in 𝑂 (N ) time and space, where N is the length of the trace 𝜎. Second, we show that the problem has a Ω(N /log 2 N ) space lower bound, and thus our algorithm is essentially time and space optimal. Third, we show that predicting races with even just a single reversal of two sync operations is NP-complete and even W[1]-hard when parameterized by the number of threads. Thus, sync-preservation characterizes exactly the tractability boundary of race prediction, and our algorithm is nearly optimal for the tractable side. Our experiments show that our algorithm is fast in practice, while sync-preservation characterizes races often missed by state-of-the-art methods.

CCS Concepts: • Software and its engineering → Software verification and validation; • Theory of computation → Theory and algorithms for application domains; Program analysis.

问问这篇 Paper

智能体会读完全文。

Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。

可以从这些问题问起

智能体调用

Luneget_paper_fulltext

在 Lune 里问

免费开始,无需绑卡

lune papers fulltext ce9683ac-c20f-4b67-a3b2-a6d59ca915aa

引用它的顶会 Paper17

问问它们各自怎么用它

它引用的顶会 Paper4

相关 Paper

黄昏的海面,两侧是细线勾勒的悬崖