Determining Determinacy ∗

Abstract

Parallel programs can avoid determinacy races (race conditions leading to indeterminate program behavior) by avoiding write/write and read/write contention between parallel tasks. Conditions to ensure that these kinds of contention are avoided have been suggested by Bernstein () and generalized by Steele (). Enforcing such conditions at compile time is undecidable for general parallel programs. Until now, attempts to enforce the conditions at runtime have had non–constant-factor overheads, sometimes coupled with a serial execution requirement. We present a runtime determinacy checker for sharedmemory parallel programs that avoids some of the drawbacks present in previous approaches to the problem. Our technique has constant-space and constant-time overheads when run on a uniprocessor machine. Our method can also run in parallel on multiprocessor machines (although some loss of parallelism may occur because our determinacy checker must arbitrate access to the data structures it uses to describe task relationships). Our technique can be applied to programs that use nested parallelism, as well as some other classes of parallel programs, including programs that use producer–consumer parallelism. We examine the performance of our algorithm in practice and show that, like array-bounds checking and other runtime checking techniques, the extent of the overheads depends on the properties of the application. ∗This work was supported by the National Science and Engineering Research Council of Canada. †Harvey Mudd College, Claremont, CA, U.S.A. E-mail: oneill@acm.org. ‡Simon Fraser University, Burnaby, BC, Canada. E-mail: burton@cs.sfu.ca.

8 Figures and Tables

Cite this paper

@inproceedings{ONeill2003DeterminingD, title={Determining Determinacy ∗}, author={Melissa E. O’Neill and F. Warren Burton}, year={2003} }