busy-wait

busy-wait

(programming)
To wait for an event by spinning through a tight loop or timed-delay loop that polls for the event on each pass, as opposed to setting up an interrupt handler and continuing execution on another part of the task. This is a wasteful technique, best avoided on time-sharing systems where a busy-waiting program may hog the processor.
References in periodicals archive ?
Problems arise when running processes block or, worse, busy-wait for action on the part of a process that the scheduler has chosen not to run.
Researchers have developed a wealth of busy-wait (spinning) mechanisms, including mutual-exclusion locks, reader-writer locks (which allow concurrent access among readers, but guarantee exclusive access by writers), and barriers (which guarantee that no process continues past a given point in a computation until all other processes have reached that point).
The simplest busy-wait locks are variants on test_and_set: every process that wants to acquire a lock attempts repeatedly to change the lock's state from free to busy.
The simplest busy-wait barriers employ a central counter, incremented via an atomic hardware primitive or protected by a lock.
The user program can request temporary suspension of signal delivery and/or preemption during busy-wait critical sections.