Respuesta :
Answer:
1) Answer is in explanation.
2) waiting on application, waiting for hardware to communicate, waiting for a file to become available, waiting for user input...
3) No, busy waiting cannot be avoided altogether.
Explanation:
1) The term "busy waiting" means a process simply spins (does nothing but continue to test it's entry conditions), while it is waiting to enter it's critical session. This continues to use (waste) CPU cycles which is inefficient. The CPU is not engaged in any real productive activity during this period, and the process does not progress towards completion.
2) Other kinds of waiting in an operating system are:
* Waiting on application
* Waiting for hardware to communicate
* Waiting for a file to become available
* Waiting for user input.
3) Busy waiting cannot be avoided altogether; some events cannot trigger a wake-up, for example, on Unix, a process cannot "sleep untill a file is modified" because the operating system does not provide any mechanism to automatically wake up the process when the even occurs. Some amount of repeated polling (checking) is required.
Generally, busy waiting is mostly avoidable on uniprocessor machines, but mostly unavoidable on multi processor machines. Therefore, busy waiting, cannot be avoided altogether.
When a task cannot continue until an event occurs, and so repeatedly polls to see if the event has occurred, it is said to be busy waiting. The key idea is that the task continues to consume processor time by repeatedly checking the condition. Examples of busy waiting include software synchronization algorithms, such as the bakery algorithm, and spinlocks using hardware synchronization primitives such as test and set.
Busy waiting means that a process is waiting for a condition to be satisfied in a tight loop without relinquish the processor.
The alternative to busy waiting is blocked waiting (also known as sleeping waiting), where a task sleeps until an event occurs. For blocked waiting to work, there must be some external agent that can wake up the task when the event has (or may have) occurred.
Processes also wait when they are ready to run (not waiting for any event) but the processor is busy executing other tasks.
Busy waiting cannot be avoided altogether. Some events cannot trigger a wakeup; for example, on Unix, a process cannot "sleep until a file is modified," because the operating system does not provide any mechanism to automatically wake up the process when the event occurs; some amount of repeated polling is required. (Windows NT, on the other hand, does allow this kind of wakeup.)
Also, blocking synchronization primitives such as semaphores need to use a lower-level synchronization technique in their implementation. On a uniprocessor machine, techniques such as disabling interrupts can enforce a critical section, but on multiprocessor machines, disabling interrupts is inadequate and some form of busy-waiting synchronization must be used.
Generally, busy waiting is mostly avoidable on uniprocessor machines, but is mostly unavoidable on multiprocessor machines. However, even on multiprocessor machines busy-waiting is best used for very short waits and limited to operating system code.
Learn More: https://brainly.com/question/24873270