answersLogoWhite

0


Best Answer
No, a busy wait cannot probably be avoided altogether. In a uniprocessor system, one could inhibit interrupts during

wait()and

signal()operations in semaphores, but that is not possible in multiprocessor systems. In fact, a busy wait (or

spinlock), can be useful, especially in multiprocessor systems, when the wait is expected to be short (as with

wait()and

signal()), because no context switch is required when a process must wait on the lock.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can busy waiting be avoided altogether?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the meaning of the term busy waiting What other kinds of waiting are there in an operating system Can busy waiting be avoided altogether Explain your 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.


I am waiting for your answer?

Be more patient, could be busy.


Define Busy waiting?

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


What is busy waiting give fragment of source code in c that shows busy waiting?

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


What is the difference between busy waiting and blocking process?

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 a multi processor environment are there some situation where busy waiting is only form of waiting can be used?

in operating system


What is busy waiting with respect to Operating System?

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.


What are the advantages and disadvantages of semaphore?

advantage small code ais busy waiting


Is jesus coming and shall you look busy?

Jesus is comming and we are waiting for that great day.


Which political party's platform completely avoided the issue of slavery altogether?

The Whig Party's platform completely avoided addressing the issue of slavery in the years leading up to the Civil War. They focused more on economic issues and internal improvements rather than taking a stance on the divisive issue of slavery.


Why was Aunt Alexandra waiting on the pourch?

She was there to help watch the kids while atticus was busy with the trial


What was the main reason to build a trench?

it was to keep the soldiers busy durning the long waiting periods between flighting.