Question

In: Computer Science

busy waiting always less efficient

Is busy waiting always less efficient (in terms of using processor time) than a blocking wait? Explain.

Solutions

Expert Solution

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

Related Solutions

There are two different ways to implement semaphore, one is to use busy waiting and the...
There are two different ways to implement semaphore, one is to use busy waiting and the other is to use block and wakeup. What are the differences between the two implementation schemes? In what scenario does the busy-waiting semaphore have a better performance than the block-and-wakeup semaphore?
Although a competitive equilibrium is always Pareto efficient, a Pareto efficient outcome is not necessarily a...
Although a competitive equilibrium is always Pareto efficient, a Pareto efficient outcome is not necessarily a competitive equilibrium.1 Explain. (It is sufficient to give an example of a Pareto efficient outcome that is not a competitive equilibrium and explain why it is not.) (A competitive equilibrium requires that consumer utility-maximize, firms profit-maximize, and Supply equals Demand (markets clear) under the assumptions that firms and consumers are price-takers, firms are owned by consumers, all goods are private goods, and there is...
Is a market output that is less than the competitive output efficient (efficient in output)? Explain...
Is a market output that is less than the competitive output efficient (efficient in output)? Explain why or why not. Is a market output that is greater than the competitive output efficient? Explain why or not.
Which of the following is always true: Diluted weighted shares is always less than or equal...
Which of the following is always true: Diluted weighted shares is always less than or equal to basic weighted average shares Diluted weighted shares is always greater than or equal to basic weighted average shares Shares outstanding on the period end date is the value used to calculate Basic EPS Shares outstanding on the period end date is the value used to calculate Diluted EPS
Within a firm, debt is always less expensive than equity. Why isn’t the WACC always the...
Within a firm, debt is always less expensive than equity. Why isn’t the WACC always the appropriate interest rate to use when determining the value of a project?
A bank claims that the mean waiting time in line is less than 1.7 minutes. A...
A bank claims that the mean waiting time in line is less than 1.7 minutes. A random sample of 20 customers has a mean of 1.5 minutes with a standard deviation of 0.8 minute. Test the bank’s claim at 0.01 level of significance.
In class we learned that investors should always hold a portfolio that is on the efficient...
In class we learned that investors should always hold a portfolio that is on the efficient frontier. In reality investors often hold a portfolio that is not on the efficient frontier. One reason for this is called home bias. Home bias refers to the fact that investors tend to have larger portfolio weights on assets that are located in the country in which they live. So, American investors tend to have a larger portfolio weight on American firms than is...
The Twister Roller Coaster always has a long line of thrill seekers waiting to take a...
The Twister Roller Coaster always has a long line of thrill seekers waiting to take a ride on it. A random sample of 60 riders waited in line a mean time of 42 minutes with a standard deviation of 12 minutes. Find a 90% confidence interval for the population mean waiting time in the Twister line.
1. The surface of a lake will always reflect light. It is less common for a...
1. The surface of a lake will always reflect light. It is less common for a lake to reflect a clear image of buildings and lights on the other side of the lake; this happens most often on still mornings or evenings. a) What is the name for the type of reflection that the lake usually exhibits? b) What is the name for the type of reflection that the lake exhibitswhen it forms clear images? c) What is the cause...
Risk averse investors will always invest in less risky assets,risk neutral investors will always invest...
Risk averse investors will always invest in less risky assets, risk neutral investors will always invest in risk-free assets, risk-taking investors will always invest in very risky assets.a. True b. False
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT