I copied the answer from other place:while any process is in its critical section , any other process that tries to enter its critical section must loop continously in the entry code.this continue looping is clearly a problem in a real multiprogramming system. where a single CPU is shared among many processes. Busy waiting wastes CPU cycles that could have been used by some process in more productive way. This type of semaphore is also called a spinlock.
Busy waiting vs. Blocking Busy waiting is preferable when: Scheduling overhead is larger than expected wait time. Process resources are not needed for another tasks Schedule -based blocking is inappropriate (e.g in OS kernel)
Single-threaded processes only have one thread of execution -- therefore it would not be possible to have two processes waiting for input at the same time.
A Deadlock is a situation of indefinite waiting where the system is stuck at a particular point and would do nothing useful. For example Method A is waiting for B's input while B is waiting for C's input and C in turn is waiting for A's input. Here all the 3 methods would continue to wait because they are waiting on one another and the system is stuck. A deadlock usually occurs while using threads. Threads can lock objects on which they are processing and when multiple threads are waiting for the same object a Dead lock may occur. The use of the synchronize keyword can be used to avoid such deadlock situations.
#define CHAIRS 5 /* # chairs for waiting customers */ typedef int semaphore; /* use your imagination */ semaphore customers = 0; /* # of customers waiting for service */ semaphore barbers = 0; /* # of barbers waiting for customers */ semaphore mutex = 1; /* for mutual exclusion */ int waiting = 0; /* customer are waiting (not being cut) */ void barber(void) { while (TRUE) { down(&customers); /* go to sleep if # of customers is 0 */ down(&mutex); /* acquire access to "waiting' */ waiting = waiting - 1; /* decrement count of waiting customers */ up(&barbers); /* one barber is now ready to cut hair */ up(&mutex); /* release 'waiting' */ cut_hair(); /* cut hair (outside critical region */ } } void customer(void) { down(&mutex); /* enter critical region */ if (waiting < CHAIRS) { /* if there are no free chairs, leave */ waiting = waiting + 1; /* increment count of waiting customers */ up(&customers); /* wake up barber if necessary */ up(&mutex); /* release access to 'waiting' */ down(&barbers); /* go to sleep if # of free barbers is 0 */ get_haircut(); /* be seated and be served */ } else { up(&mutex); /* shop is full; do not wait */ } }

I am waiting for the answer
_ A process is waiting for an event to occur and it does so by executing instructions. _ A process is waiting for an event to occur in some waiting queue (e.g., I/O, semaphore) and it does so without having the CPU assigned to it. _ Busy waiting cannot be avoided altogether.
The repeated execution of a loop of code while waiting for an event to occur is called busy-waiting. The CPU is not engaged in any real productive activity during this period, and the process does not progress toward completion.
Be more patient, could be busy.
"Busy waiting" is the act of actively waiting for some condition to change. In programming microcontrollers, one might want to wait for a pin to become high or low before continuing with the program. A "busy waiting loop" in C would look like this: ... while(PIN1 != HIGH) ; ... This essentially does nothing but check the value of "PIN1" time after time, waiting for it to become "HIGH". Now, if PIN1 were to become "HIGH", the processor "breaks out" of this busy-waiting loop and continues with the program.
while(test-and-set(1)) { //access critical section } busy waiting is constantally checking for a condition for true if it does not again and again check the condition upto condition becomes true
Busy waiting vs. Blocking Busy waiting is preferable when: Scheduling overhead is larger than expected wait time. Process resources are not needed for another tasks Schedule -based blocking is inappropriate (e.g in OS kernel)
in operating system
advantage small code ais busy waiting
as
Jesus is comming and we are waiting for that great day.
She was there to help watch the kids while atticus was busy with the trial
shes a busy b shvaing her legs, saving the earth w tf knows . in what context does this business occur