Fast Atomicity Monitoring

📅 2026-04-13
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses atomicity violations in concurrent programs—a prevalent source of concurrency bugs—by introducing AtomSanitizer, a novel stream-based conflict serializability detection algorithm. AtomSanitizer achieves a time complexity of O(nk²), substantially outperforming existing approaches, and integrates a lightweight runtime monitoring mechanism within the ThreadSanitizer (TSAN) framework to enable low-overhead, real-time atomicity validation. Experimental evaluation demonstrates that AtomSanitizer consistently outperforms state-of-the-art detectors on standard benchmarks, with both time and memory overheads comparable to those of TSAN’s data race detection, thereby offering an efficient solution for runtime atomicity monitoring in concurrent software.

Technology Category

Application Category

📝 Abstract
Atomicity is a fundamental abstraction in concurrency, specifying that program behavior can be understood by considering specific code blocks executing atomically. However, atomicity invariants are tricky to maintain while also optimizing for code efficiency, and atomicity violations are a common root cause of many concurrency bugs. To address this problem, several dynamic techniques have been developed for testing whether a program execution adheres to an atomicity specification, most often instantiated as \emph{conflict serializability}. The efficiency of the analysis has been targeted in various papers, with the state-of-the-art algorithms \textsc{RegionTrack} and \textsc{Aerodrome} achieving a time complexity $O(nk^3)$ and $O(nk(k + v + \ell))$, respectively, for a trace $σ$ of $n$ events, $k$ threads, $v$ locations, and $\ell$ locks. In this paper we introduce \textsc{AtomSanitizer}, a new algorithm for testing conflict serializability, with time complexity $O(nk^2)$. \textsc{AtomSanitizer} operates in an efficient streaming style, is theoretically faster than all existing algorithms, and also has a smaller memory footprint. Moreover, \textsc{AtomSanitizer} is the first algorithm designed to incur minimal locking when deployed in a concurrent monitoring setting. Experiments on standard benchmarks indicate that \textsc{AtomSanitizer} is always faster in practice than all existing conflict-serializability testers. Finally, we also implement \textsc{AtomSanitizer} inside the TSAN framework, for monitoring atomicity in real time. Our experiments reveal that \textsc{AtomSanitizer} incurs minimal time and space overhead compared to the data-race detection engine of TSAN, and thus is the first algorithm for conflict serializability demonstrated to be suitable for a runtime monitoring setting.
Problem

Research questions and friction points this paper is trying to address.

atomicity
conflict serializability
concurrency bugs
dynamic analysis
runtime monitoring
Innovation

Methods, ideas, or system contributions that make the work stand out.

AtomSanitizer
conflict serializability
atomicity monitoring
runtime verification
concurrent debugging
🔎 Similar Papers
No similar papers found.