|
ABSTRACT
In shared-memory parallel programs that use explicit synchronization, race conditions result when accesses to shared memory are not properly synchronized. Race conditions are often considered to be manifestations of bugs, since their presence can cause the program to behave unexpectedly. Unfortunately, there has been little agreement in the literature as to precisely what constitutes a race condition. Two different notions have been implicitly considered: one pertaining to programs intended to be deterministic (which we call general races) and the other to nondeterministic programs containing critical sections (which we call data races). However, the differences between general races and data races have not yet been recognized. This paper examines these differences by characterizing races using a formal model and exploring their properties. We show that two variations of each type of race exist: feasible general races and data races capture the intuitive notions desired for debugging and apparent races capture less accurate notions implicitly assumed by most dynamic race detection methods. We also show that locating feasible races is an NP-hard problem, implying that only the apparent races, which are approximations to feasible races, can be detected in practice. The complexity of dynamically locating apparent races depends on the type of synchronization used by the program. Apparent races can be exhaustively located efficiently only for weak types of synchronization that are incapable of implementing mutual exclusion. This result has important implications since we argue that debugging general races requires exhaustive race detection and is inherently harder than debugging data races (which requires only partial race detection). Programs containing data races can therefore be efficiently debugged by locating certain easily identifiable races. In contrast, programs containing general races require more complex debugging techniques.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
ALLEN, T. R., AND PADUA, D. A. Debugging Fortran in a shared memory machine. In Proceedings of the 1987 International Conference on Parallel Processing (St. Charles, IL, Aug. 1987), pp. 721-727.
|
 |
2
|
|
| |
3
|
BERNSTEIN, A. J. Analysis of programs for parallel processing. IEEE Trans. Electronic Comput. EC-15 5 (Oct. 1966), 757-763.
|
 |
4
|
|
 |
5
|
|
| |
6
|
DINNING, A., AND SCHONBERG, E. The task recycling technique for detecting access anomalies on-the-fly. IBM Tech. Rep. RC 15385, Jan. 1990.
|
 |
7
|
|
 |
8
|
|
 |
9
|
|
 |
10
|
P. A. Emrath , S. Chosh , D. A. Padua, Event synchronization analysis for debugging parallel programs, Proceedings of the 1989 ACM/IEEE conference on Supercomputing, p.580-588, November 12-17, 1989, Reno, Nevada, United States
[doi> 10.1145/76263.76329]
|
| |
11
|
HEMLBOLD, D. P., McDOWELL, C. E., AND WANG, J.-Z. Analyzing traces with anonymous synchronization. In Proceedings of the 1990 International Conference on Parallel Processing (St. Charles, IL, Aug. 1990), pp. 70-77.
|
| |
12
|
|
| |
13
|
|
| |
14
|
LAMPORT, L. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput. C-28 9 (Sept. 1979), 690-691.
|
 |
15
|
|
 |
16
|
|
 |
17
|
|
 |
18
|
|
| |
19
|
NETZER, R. H. B., AND MILLER, B.P. On the complexity of event ordering for shared-memory parallel program executions. In Proceedings of the 1990 International Conference on Parallel Processing (St. Charles, IL, Aug. 1990), pp. II-93-II-97.
|
 |
20
|
|
| |
21
|
|
| |
22
|
NETZER, R. H. B., AND MILLER, B.P. Detecting data races in parallel program executions. In Advances in Languages and Compilers for Parallel Processing, A. Nicolau, D. Gelernter, T. Gross, and D. Padua, Eds. MIT Press 1991, 109-129.
|
| |
23
|
NETZER, R. H. B., AND GHOSH, S. Efficient race condition detection for shared-memory programs with post/wait synchronization. In Proceedings of the 1992 International Conference on Parallel Processing (St. Charles, IL, Aug. 1992).
|
| |
24
|
NUDLER, I., AND RUDOLPH, L. Tools for the efficient development of efficient parallel programs. In Proceedings of the 1st Israeli Conference on Computer System Engineering (1988).
|
 |
25
|
|
 |
26
|
|
CITED BY 41
|
|
|
|
|
Guang-Ien Cheng , Mingdong Feng , Charles E. Leiserson , Keith H. Randall , Andrew F. Stark, Detecting data races in Cilk programs that use locks, Proceedings of the tenth annual ACM symposium on Parallel algorithms and architectures, p.298-309, June 28-July 02, 1998, Puerto Vallarta, Mexico
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Hagit Attiya , Soma Chaudhuri , Roy Friedman , Jennifer L. Welch, Shared memory consistency conditions for non-sequential execution: definitions and programming strategies, Proceedings of the fifth annual ACM symposium on Parallel algorithms and architectures, p.241-250, June 30-July 02, 1993, Velen, Germany
|
|
|
|
|
|
|
|
|
|
|
|
Peter A. Buhr , Martin Karsten , Jun Shih, KDB: a multi-threaded debugger for multi-threaded applications, Proceedings of the SIGMETRICS symposium on Parallel and distributed tools, p.80-87, May 22-23, 1996, Philadelphia, Pennsylvania, United States
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Utpal Banerjee , Brian Bliss , Zhiqiang Ma , Paul Petersen, A theory of data race detection, Proceeding of the 2006 workshop on Parallel and distributed systems: testing and debugging, July 17-17, 2006, Portland, Maine, USA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Arun Kejariwal , Hideki Saito , Xinmin Tian , Milind Girkar , Wel Li , Utpal Banerjee , Alexandru Nicolau , Constantine D. Polychronopoulos, Lightweight lock-free synchronization methods for multithreading, Proceedings of the 20th annual international conference on Supercomputing, June 28-July 01, 2006, Cairns, Queensland, Australia
|
|
|
Bohuslav Krena , Zdenek Letko , Rachel Tzoref , Shmuel Ur , Tomáš Vojnar, Healing data races on-the-fly, Proceedings of the 2007 ACM workshop on Parallel and distributed systems: testing and debugging, July 09-09, 2007, London, United Kingdom
|
|
|
|
|
|
Ali Jannesari , Walter F. Tichy, On-the-fly race detection in multi-threaded programs, Proceedings of the 6th workshop on Parallel and distributed systems: testing, analysis, and debugging, p.1-10, July 20-21, 2008, Seattle, Washington
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Scott D. Fleming , Eileen Kraemer , R. E. K. Stirewalt , Shaohua Xie , Laura K. Dillon, A study of student strategies for the corrective maintenance of concurrent software, Proceedings of the 30th international conference on Software engineering, May 10-18, 2008, Leipzig, Germany
|
|
|
|
|
|
Matteo Frigo , Pablo Halpern , Charles E. Leiserson , Stephen Lewin-Berlin, Reducers and other Cilk++ hyperobjects, Proceedings of the twenty-first annual symposium on Parallelism in algorithms and architectures, August 11-13, 2009, Calgary, AB, Canada
|
REVIEW
"Lishing Liu : Reviewer"
Race conditions occur during the execution of parallel programs
when accesses to shared data are not properly synchronized. Detection of
race conditions is a fundamental aspect of the debugging of parallel
programs. Various types of research w
more...
|