A tree clock data structure for causal orderings in concurrent executions
Umang Mathur, Andreas Pavlogiannis, Hünkar Can Tunç, Mahesh Viswanathan
摘要
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 Θ(𝑘) time, where 𝑘 is the number of threads. Thus they are a computational bottleneck when 𝑘 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 Θ(𝑘) 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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- The Complexity of Dynamic Data Race Prediction 引用了 Fast, sound, and effectively complete dynamic race prediction
- CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis 引用了 The Complexity of Dynamic Data Race Prediction
- CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis 引用了 Fast, sound, and effectively complete dynamic race prediction
- CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis 引用了 SmartTrack: efficient predictive race detection
- CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis 引用了 Atomicity Checking in Linear Time using Vector Clocks
- CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis 引用了 Optimistic Prediction of Synchronization-Reversal Data Races
- Dynamic Race Detection with O(1) Samples 引用了 The Complexity of Dynamic Data Race Prediction
- Dynamic Race Detection with O(1) Samples 引用了 Fast, sound, and effectively complete dynamic race prediction
- Dynamic Race Detection with O(1) Samples 引用了 SmartTrack: efficient predictive race detection
- Dynamic Race Detection with O(1) Samples 引用了 Atomicity Checking in Linear Time using Vector Clocks
- Dynamic Race Detection with O(1) Samples 引用了 Optimal prediction of synchronization-preserving races
- SmartTrack: efficient predictive race detection 引用了 Fast, sound, and effectively complete dynamic race prediction
- Predictive Monitoring against Pattern Regular Languages 引用了 The Complexity of Dynamic Data Race Prediction
- Predictive Monitoring against Pattern Regular Languages 引用了 Fast, sound, and effectively complete dynamic race prediction
- Predictive Monitoring against Pattern Regular Languages 引用了 SmartTrack: efficient predictive race detection
- Predictive Monitoring against Pattern Regular Languages 引用了 Atomicity Checking in Linear Time using Vector Clocks
- Predictive Monitoring against Pattern Regular Languages 引用了 Optimal prediction of synchronization-preserving races
- Optimal prediction of synchronization-preserving races 引用了 The Complexity of Dynamic Data Race Prediction
- Optimal prediction of synchronization-preserving races 引用了 Fast, sound, and effectively complete dynamic race prediction
- Optimal prediction of synchronization-preserving races 引用了 SmartTrack: efficient predictive race detection
- Optimal prediction of synchronization-preserving races 引用了 Atomicity Checking in Linear Time using Vector Clocks
- Optimistic Prediction of Synchronization-Reversal Data Races 引用了 The Complexity of Dynamic Data Race Prediction
- Optimistic Prediction of Synchronization-Reversal Data Races 引用了 Dynamic Race Detection with O(1) Samples
- Optimistic Prediction of Synchronization-Reversal Data Races 引用了 Fast, sound, and effectively complete dynamic race prediction
- Optimistic Prediction of Synchronization-Reversal Data Races 引用了 SmartTrack: efficient predictive race detection
- Optimistic Prediction of Synchronization-Reversal Data Races 引用了 Atomicity Checking in Linear Time using Vector Clocks
- Optimistic Prediction of Synchronization-Reversal Data Races 引用了 Predictive Monitoring against Pattern Regular Languages
- Optimistic Prediction of Synchronization-Reversal Data Races 引用了 Optimal prediction of synchronization-preserving races
- AWDIT: An Optimal Weak Database Isolation Tester 引用了 The Complexity of Dynamic Data Race Prediction
- AWDIT: An Optimal Weak Database Isolation Tester 引用了 CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution Analysis
- AWDIT: An Optimal Weak Database Isolation Tester 引用了 Fast, sound, and effectively complete dynamic race prediction
引用它的顶会 Paper8
- Predictive Monitoring against Pattern Regular LanguagesZhendong Ang, Umang MathurPOPL 2024 · 12 次引用
- Dynamic Race Detection with O(1) SamplesMosaad Al Thokair, Minjian Zhang, Umang Mathur, Mahesh ViswanathanPOPL 2023 · 9 次引用
- Optimistic Prediction of Synchronization-Reversal Data RacesZheng Shi, Umang Mathur, Andreas PavlogiannisICSE 2024 · 8 次引用
- CSSTs: A Dynamic Data Structure for Partial Orders in Concurrent Execution AnalysisHünkar Can Tunç, Ameya Prashant Deshmukh, Berk Çirisci, Constantin Enea 等ASPLOS 2024 · 6 次引用
- AWDIT: An Optimal Weak Database Isolation TesterLasse Møldrup, Andreas PavlogiannisPLDI 2025 · 5 次引用
它引用的 Paper6
- Fast, sound, and effectively complete dynamic race predictionAndreas PavlogiannisPOPL 2020 · 46 次引用
- Optimal prediction of synchronization-preserving racesUmang Mathur, Andreas Pavlogiannis, Mahesh ViswanathanPOPL 2021 · 36 次引用
- SmartTrack: efficient predictive race detectionJake Roemer, Kaan Genç, Michael D. BondPLDI 2020 · 28 次引用
- The Complexity of Dynamic Data Race PredictionUmang Mathur, Andreas Pavlogiannis, Mahesh ViswanathanLICS 2020 · 27 次引用
- Atomicity Checking in Linear Time using Vector ClocksUmang Mathur, Mahesh ViswanathanASPLOS 2020 · 27 次引用
相关 Paper
- Efficient Timestamping for Sampling-Based Race DetectionMinjian Zhang, Daniel Wee Soong Lim, Mosaad Al Thokair, Umang Mathur 等PLDI 2025 · 1 次引用
- Unblocking Dynamic Partial Order ReductionMichalis Kokologiannakis, Iason Marmanis, Viktor VafeiadisCAV 2023 · 7 次引用
- Predictive Monitoring with Strong Trace PrefixesZhendong Ang, Umang MathurCAV 2024 · 3 次引用
- Efficient Predictive Monitoring of Message Passing Interface ProgramsJiaqiang Yao, Haocheng Geng, Zhenbang ChenISSTA 2026
- Detecting concurrency vulnerabilities based on partial orders of memory and thread eventsKunpeng Yu, Chenxu Wang, Yan Cai, Xiapu Luo 等FSE 2021 · 9 次引用
