Software → Operating Systems
Race Condition
A bug where program behavior depends on the timing or ordering of concurrent operations.
Motivation
Race condition describes the problem of program behavior depending on timing between concurrent operations.
Where it fits
Race Condition belongs to concurrent programming and reliability.
Mental model
If two operations race to read or write shared state, the result may change depending on interleaving.
Common mistakes
- Thinking race conditions always reproduce reliably.
- Assuming tests will catch all timing bugs.
Related concepts
Race Condition connects to synchronization, mutex, critical section, and thread safety.