In: Computer Science
Is busy waiting always less efficient (in terms of using processor time) than a blocking wait? Explain.
On average, yes, because busy-waiting consumes useless instruction cycles. However, in a particular case, if a process comes to a point in the program where it must wait for a condition to be satisfied, and if that condition is already satisfied, then the busy-wait will find that out immediately, whereas, the blocking wait will consume OS resources switching out of and back into the process
the blocking wait will consume OS resources switching out of and back into the process