Runtime analysis of atomicity for multithreaded programs
Authors:
- 27 February 2006
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 32 (2) , 93-110
Abstract
Atomicity is a correctness condition for concurrent systems. Informally, atomicity is the property that every concurrent execution of a set of transactions is equivalent to some serial execution of the same transactions. In multithreaded programs, executions of procedures (or methods) can be regarded as transactions. Correctness in the presence of concurrency typically requires atomicity of these transactions. Tools that automatically detect atomicity violations can uncover subtle errors that are hard to find with traditional debugging and testing techniques. This paper describes two algorithms for runtime detection of atomicity violations and compares their cost and effectiveness. The reduction-based algorithm checks atomicity based on commutativity properties of events in a trace; the block-based algorithm efficiently represents the relevant information about a trace as a set of blocks (i.e., pairs of events plus associated synchronizations) and checks atomicity by comparing each block with other blocks. To improve the efficiency and accuracy of both algorithms, we incorporate a multilockset algorithm for checking data races, dynamic escape analysis, and happen-before analysis. Experiments show that both algorithms are effective in finding atomicity violations. The block-based algorithm is more accurate but more expensive than the reduction-based algorithm.Keywords
This publication has 23 references indexed in Scilit:
- Exploiting Object Escape and Locking Information in Partial-Order Reductions for Concurrent Object-Oriented ProgramsFormal Methods in System Design, 2004
- Static Detection of Atomicity Violations in Object-Oriented Programs.The Journal of Object Technology, 2004
- Type Inference Against RacesLecture Notes in Computer Science, 2004
- Verifying Commit-Atomicity Using Model-CheckingLecture Notes in Computer Science, 2004
- High‐level data racesSoftware Testing, Verification and Reliability, 2003
- Run-Time Analysis for AtomicityElectronic Notes in Theoretical Computer Science, 2003
- EraserACM Transactions on Computer Systems, 1997
- Linearizability: a correctness condition for concurrent objectsACM Transactions on Programming Languages and Systems, 1990
- The serializability of concurrent database updatesJournal of the ACM, 1979
- ReductionCommunications of the ACM, 1975