Demonstration of Busy Waiting

This process of busy waiting concerning the scenario is demonstrated below:

Step 1: Process 1 makes use of a shared resource

As shown in the above diagram, process 1 makes use of a shared resource. It releases the resource only once it has completed its task or any other high-priority process arises.

Step 2: Process 2 needs the shared resource that is already being used by process 1

As shown in above diagram the process 2 needs the shared resource, but the resource is already in used by the process 1. Therefore it needs to wait until the resource is free.

Step 3: Process 2 enters into busy waiting state until its get access to the shared resource

As shown in above diagram, the process 2 goes in busy waiting state that makes use of the processor and continuously checks for the shared resource to get allocated.

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.

Similar Reads

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....

Demonstration of Busy Waiting

This process of busy waiting concerning the scenario is demonstrated below:...

Need of Busy Waiting

Busy waiting is required in operating system for achieving mutual exclusion. Mutual exclusion is used for preventing the processes from accessing the shared resources simultaneously. In operating system the critical section is defined as a program code in which concurrent access is avoided. In the critical section of processes they are granted with exclusive control for accessing it’s resources without any interference from the other available processes in mutual exclusion....

Limitations of Busy Waiting

Below are the limitations of Busy Waiting:...

FAQs on Busy Waiting

Q.1. Does busy waiting leads to deadlock?...