Detection of Races and Control-Flow Nondeterminism

  • Authors:
  • Ming-Dong Feng;Chung-Kwong Yuen

  • Affiliations:
  • -;-

  • Venue:
  • LCR '98 Selected Papers from the 4th International Workshop on Languages, Compilers, and Run-Time Systems for Scalable Computers
  • Year:
  • 1998

Quantified Score

Hi-index 0.00

Visualization

Abstract

When either of two concurrent accesses of the same data is not in its critical section, a "race condition" occurs. Previous race-detection techniques are only applicable to parallel programs without using critical sections, or to parallel programs with critical sections implemented by mutex locks. This paper presents a race-detection algorithm, called the Protect algorithm, for parallel programs where critical sections are defined in a higher-level programming construct - "critical region". Both the time and space complexity of the Protect algorithm is improved over ones of the previous race-detection algorithms. If the control-flow of a parallel execution on a given input is deterministic, then a single-run of any race-detection algorithm guarantees to find out all races. In the presence of nondeterministic control-flow, a single-run of any race-detection algorithm cannot find out all races. We present another algorithm, called the Alter algorithm, which either guarantees to detect any nondeterministic control-flow in a program using critical regions, or certifies that the program is control-flow deterministic, thereafter all races can be detected by the Protect algorithm.