Optimal prediction of synchronization-preserving races
Optimal prediction of synchronization-preserving races
复制标题
同步保持竞争的最佳预测
DOI:
10.1145/3434317
复制
发表时间:
2021
影响因子:
--
通讯作者:
Viswanathan, Mahesh
中科院分区:
文献类型:
--
作者:
Mathur, Umang;Pavlogiannis, Andreas;Viswanathan, Mahesh
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, whereNis the length of the trace σ. Second, we show that the problem has a Ω(N/log2N) 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 W1-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.
登录
查看更多内容
DOI:
10.1145/3373376.3378475
发表时间:
2020-01
期刊:
Proceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems
影响因子:
--
作者:
Umang Mathur;Mahesh Viswanathan
通讯作者:
Umang Mathur;Mahesh Viswanathan
DOI:
--
发表时间:
2001
期刊:
影响因子:
--
作者:
Lorna Smith;J. M. Bull
通讯作者:
J. M. Bull
DOI:
10.1007/978-3-319-89884-1_4
发表时间:
2018
期刊:
影响因子:
--
作者:
Joaquín Aguado;Michael Mendler;Marc Pouzet;Partha S. Roop;Reinhard von Hanxleden
通讯作者:
Reinhard von Hanxleden
DOI:
--
发表时间:
2009
期刊:
International Conference on Tools and Algorithms for Construction and Analysis of Systems
影响因子:
--
作者:
Azadeh Farzan;P. Madhusudan
通讯作者:
P. Madhusudan