1. What is the Thread Analyzer and What Does It Do?
1.1 Getting Started With the Thread Analyzer
1.4 The Thread Analyzer Usage Model
1.4.1 Usage Model for Detecting Data Races
1.4.1.1 Instrument the Code for Data Race Detection
1.4.1.2 Create an Experiment on the Instrumented Application
1.4.1.3 Examine the Experiment for Data Races
1.4.2 Usage Model for Detecting Deadlocks
1.4.2.1 Create an Experiment for Detecting Deadlocks
1.4.2.2 Examine the Experiment for Deadlocks
1.4.3 Usage Model for Detecting Data Races and Deadlocks
The Thread Analyzer detects data races that occur during the execution of a multithreaded process. A data race occurs when all of the following are true:
Two or more threads in a single process access the same memory location concurrently
At least one of the accesses is for writing
The threads are not using any exclusive locks to control their accesses to that memory
When these three conditions hold, the order of accesses is non-deterministic, and the computation may give different results from run to run depending on that order. Some data races may be benign (for example, when the memory access is used for a busy-wait), but many data races are bugs in the program.
The Thread Analyzer works on a multithreaded program written using the POSIX thread API, Solaris thread API, OpenMP, or a mix of these.