Race condition

related topics
{system, computer, user}
{math, number, function}
{car, race, vehicle}
{law, state, case}
{theory, work, human}
{rate, high, increase}
{government, party, election}

A race condition or race hazard is a flaw in an electronic system or process whereby the output and/or result of the process is unexpectedly and critically dependent on the sequence or timing of other events. The term originates with the idea of two signals racing each other to influence the output first.

Race conditions can occur in electronics systems, especially logic circuits, and in computer software, especially multithreaded or distributed programs.

Contents

Electronics

A typical example of a race condition may occur in a system of logic gates, where inputs vary. If a particular output depends on the state of the inputs, it may only be defined for steady-state signals. As the inputs change state, a small delay will occur before the output changes, due to the physical nature of the electronic system. For a brief period, the output may change to an unwanted state before settling back to the designed state. Certain systems can tolerate such glitches, but if for example this output functions as a clock signal for further systems that contain memory, the system can rapidly depart from its designed behaviour (in effect, the temporary glitch becomes permanent).

For example, consider a two input AND gate fed with a logic signal A on one input and its negation, NOT A, on another input. In theory, the output (A AND NOT A) should never be high. However, if changes in the value of A take longer to propagate to the second input than the first when A changes from false to true, a brief period will ensue during which both inputs are true, and so the gate's output will also be true. [1]

Proper design techniques (e.g. Karnaugh maps) encourage designers to recognize and eliminate race conditions before they cause problems.

As well as these problems, some logic elements can enter metastable states, which create further problems for circuit designers.

Full article ▸

related documents
Multiprocessing
Data compression
IBM 1401
Control character
Instruction set
IBM AIX (operating system)
ICL VME
DirectX
Scrambler
Internet Message Access Protocol
Terminate and Stay Resident
IBM System/370
TOPS-20
KDE
Blue Gene
Data Link Layer
Multicast
Desktop environment
Revision control
Hercules Graphics Card
Video Graphics Array
Winamp
Computer networking
File server
Load balancing (computing)
Symmetric multiprocessing
PKZIP
LAN switching
Digital signal processing
General Packet Radio Service