What is Busy Waiting?
Busy Waiting is defined as a process synchronization technique where the process waits and continuously keeps on checking for the condition to be satisfied before going ahead with its execution. Busy Waiting is also known as busy looping or spinning. The condition that is to be checked is the entry condition to be true such as availability of a resource or lock in the computer system.
Consider a scenario where a resource is required by the process for execution of a specific program. The resource is being used by another process and is unavailable at that moment. Therefore the process needs to wait for the resource to become available.
Busy Waiting in OS
Waiting in the operating system consists of two approaches namely Busy Waiting and Sleep Waiting. Busy waiting is defined as the process where the process or task continuously the processor and waits for the condition to be satisfied. Whereas Sleep waiting is defined as a process where the task or process does not consume the processor when it is waiting for its condition to be satisfied. The below article covers in detail busy waiting.