Table of Contents
Fetching ...

Efficient Dynamic Algorithms to Predict Short Races

Minjian Zhang, Mahesh Viswanathan

TL;DR

This work presents a monitoring framework for short-race prediction and instantiate the framework for happens-before and sync-preserving races, yielding efficient detection algorithms that run faster and consumes significantly less space than SyncP.

Abstract

We introduce and study the problem of detecting short races in an observed trace. Specifically, for a race type $R$, given a trace $σ$ and window size $w$, the task is to determine whether there exists an $R$-race $(e_1, e_2)$ in $σ$ such that the subtrace starting with $e_1$ and ending with $e_2$ contains at most $w$ events. We present a monitoring framework for short-race prediction and instantiate the framework for happens-before and sync-preserving races, yielding efficient detection algorithms. Our happens-before algorithm runs in the same time as FastTrack but uses space that scales with $\log w$ as opposed to $\log |σ|$. For sync-preserving races, our algorithm runs faster and consumes significantly less space than SyncP. Our experiments validate the effectiveness of these short-race detection algorithms: they run more efficiently, use less memory, and detect significantly more races under the same budget, offering a reasonable balance between resource usage and predictive power.

Efficient Dynamic Algorithms to Predict Short Races

TL;DR

This work presents a monitoring framework for short-race prediction and instantiate the framework for happens-before and sync-preserving races, yielding efficient detection algorithms that run faster and consumes significantly less space than SyncP.

Abstract

We introduce and study the problem of detecting short races in an observed trace. Specifically, for a race type , given a trace and window size , the task is to determine whether there exists an -race in such that the subtrace starting with and ending with contains at most events. We present a monitoring framework for short-race prediction and instantiate the framework for happens-before and sync-preserving races, yielding efficient detection algorithms. Our happens-before algorithm runs in the same time as FastTrack but uses space that scales with as opposed to . For sync-preserving races, our algorithm runs faster and consumes significantly less space than SyncP. Our experiments validate the effectiveness of these short-race detection algorithms: they run more efficiently, use less memory, and detect significantly more races under the same budget, offering a reasonable balance between resource usage and predictive power.
Paper Structure (16 sections, 6 theorems, 4 equations, 4 figures, 3 tables, 3 algorithms)

This paper contains 16 sections, 6 theorems, 4 equations, 4 figures, 3 tables, 3 algorithms.

Key Result

Proposition 1

If a well-formed trace $\sigma$ has a happens-before race then $\sigma$ also has a sync-preserving race.

Figures (4)

  • Figure 1: High-level mechanics of the monitoring framework. A window of size $\mathsf{w}$ slides over the event stream to enumerate candidates. When the window advances, $\mathsf{collect}$ (left boundary) evicts $e_{\mathit{old}}$ and prunes history-dependent state irrelevant to future Short-$\mathsf{R}$ checks. $\mathsf{activate}$ (right boundary) ingests $e_{\mathit{new}}$ and updates the underlying detector state $M_A$, keeping memory bounded by $O(\mathsf{w})$.
  • Figure 2: Events count across benchmark groups. (a): Total events analyzed(log). (b): Average of normalized analyzed events relative to each trace’s size across each benchmark group.
  • Figure 3: (a): Total running time (log). (b): Average normalized running time relative to the baseline.
  • Figure 4: (a): Sum of average max heap usage. (b): Normalized average of analyzed events relative baseline's max heap usage.

Theorems & Definitions (10)

  • Proposition 1: SyncP2021
  • Remark 2: Decision vs. reporting
  • Proposition 3: Locality of HB races
  • Remark 4
  • Theorem 5
  • Example 6: Circular window on a short trace
  • Example 7: Circular window comparison
  • Proposition 8
  • Proposition 9
  • Theorem 10