Skip to main content
Log in

Can a Shared-Memory Model Serve as a Bridging Model for Parallel Computation?

  • Published:
Theory of Computing Systems Aims and scope Submit manuscript

Abstract.

A parallel multithreaded program that is ostensibly deterministic may nevertheless behave nondeterministically due to bugs in the code. These bugs are called determinacy races, and they result when one thread updates a location in shared memory while another thread is concurrently accessing the location. We have implemented a provably efficient determinacy-race detector for Cilk, an algorithmic multithreaded programming language. If a Cilk program is run on a given input data set, our debugging tool, which we call the ``Nondeterminator,'' either determines at least one location in the program that is subject to a determinacy race, or else it certifies that the program is race free when run on the data set.

The core of the Nondeterminator is an asymptotically efficient serial algorithm (inspired by Tarjan's nearly linear-time least-common-ancestors algorithm) for detecting determinacy races in series-parallel directed acyclic graphs. For a Cilk program that runs in T time on one processor and uses v shared-memory locations, the Nondeterminator runs in O(T α(v,v)) time, where α is Tarjan's functional inverse of Ackermann's function, a very slowly growing function which, for all practical purposes, is bounded above by 4 . The Nondeterminator uses at most a constant factor more space than does the original program. On a variety of Cilk program benchmarks, the Nondeterminator exhibits a slowdown of less than 12 compared with the serial execution time of the original optimized code, which we contend is an acceptable slowdown for debugging purposes.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

Author information

Authors and Affiliations

Authors

Additional information

Received November 11, 1997, and in final form September 21, 1998.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Gibbons, P., Matias, Y. & Ramachandran, V. Can a Shared-Memory Model Serve as a Bridging Model for Parallel Computation? . Theory Comput. Systems 32, 327–359 (1999). https://doi.org/10.1007/s002240000121

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/s002240000121

Keywords

Navigation