Jump to content

Busy spin

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 209.8.184.25 (talk) at 03:03, 23 December 2003 (Move exception to condemnation up to be right after the condemnation :)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computer science, a busy spin is a process looping while continually rechecking if some event has occurred (thus, "busy" for the continual checking, "spin" for the looping).

This is generally considered poor practice, as it eats up processor time, and is a particular concern in multi-tasking or multi-user environments. However, spinning can be a valid strategy in certain special circumstances, most notably in the implementation of spinlocks within operating systems themselves.

Alternatives include event notification and polling (depending on the capability of the operating system).