microZEUS
The whole stack, hand-drawn.

◄ Wiki / OS

race / race condition

A bug where the outcome depends on the unpredictable timing of two things happening at once.

When two threads or events touch the same data without proper coordination, the result can differ depending on which one happens to win the 'race' — and that timing is not reproducible. A classic example is a timer tick landing in the middle of an operation that assumed it wouldn't be interrupted. These bugs are notoriously hard to reproduce and fix because they only appear under specific, rare timing.

See also

  • preemption / preemptiveWhen the OS forcibly pauses a running thread mid-execution to let a different one run.
  • reaperA background kernel thread that cleans up threads that have finished, freeing their resources.

Referenced by

PID / TID · preemption / preemptive · reaper