skip to main content
Race-Condition Detection in Parallel Computation with SemaphoresJanuary 1996
1996 Technical Report
Publisher:
  • Brown University
  • Department of Computer Science Box 1910 Providence, RI
  • United States
Published:01 January 1996
Bibliometrics
Skip Abstract Section
Abstract

We address a problem arising in debugging parallel programs, detecting race conditions in programs using semaphores for synchronization. It is NP-complete to detect race conditions in programs that use many semaphores. We show in this paper that it remains NP-complete even if the programs are allowed to use only two semaphores. For the case of single semaphore, Lu, Klein, and Netzer gave the previously only-known polynomial-time algorithm that runs in time $O(n^{1.5}p)$, where $p$ is the number of processors and $n$ is the total number of semaphore operations executed. Their algorithm, however, detects only a special class of race conditions. In this paper we cope with the general race-condition detection problem and give an $O(np\log n)$-time algorithm. The output of our algorithm is a compact representation from which one can determine in constant time whether a race condition exists between two given operations.

Contributors
  • Brown University

Recommendations