Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M5811

Busy Waiting

Busy Waiting
SystemsHigh supportSystems Theory
Included
account_tree

Version 1.0.0 · Updated 2026-07-28

CORE DEFINITION

In software engineering, busy waiting (also known as spinning; English: Busy waiting, busy-looping, spinning) is a technique based on a process repeatedly checking whether a condition is true, which may be keyboard input or whether a lock is available. Busy waiting can also be used to generate an arbitrary time delay, if the system does not provide a method to generate a specific length of time, then busy waiting is needed. Different computer processors vary greatly in speed, especially some processors are designed to dynamically adjust their rate based on external factors (such as load on the operating system). Therefore, busy waiting as a time delay technique is prone to unpredictable and even inconsistent results, unless the implementation code determines the speed at which the processor executes the 'do nothing' loop, or the loop code explicitly checks the real-time clock. In some cases, busy waiting is an effective strategy, especially on operating systems that implement spinlock designs for symmetric multiprocessing. However, in general, busy waiting is an anti-pattern that should be avoided; processor time should be used to perform other tasks rather than being wasted on useless activity.

SCAFFOLDING EFFECT

psychology

Reduce cognitive load

In software engineering, busy waiting (also known as spinning; English: Busy waiting, busy-looping, spinning) is a technique based on a process repeatedly checking whether a condition is true, which may be keyboard input or whether a lock is available. Busy waiting can also be used to generate an arbitrary time delay, if the system does not provide a method to generate a specific length of time, then busy waiting is needed.

anchor

Anchor fast decisions

Busy waiting (spinning): a thread repeatedly polls and checks a condition without yielding the CPU, achieving extremely low latency response but wasting computing power; it is a classic trade-off of CPU usage for response speed.

MINIMUM ACTION

In progress 0/4

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%
account_treeGenealogyexpand_more
menu_bookReferencesexpand_more

Source support: Explicit

  • link
    zh.wikipedia.orghttps://zh.wikipedia.org/wiki/%E5%BF%99%E7%A2%8C%E7%AD%89%E5%BE%85ZH · Explicit
    verified

RELATED MODELS