Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What is the meaning of the term busy waiting? What other kinds of waiting are th

ID: 3715967 • Letter: W

Question

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.

Explain why implementing synchronization primitives by disabling interrupts is not appropriate in a single-processor system if the synchronization primitives are to be used in user-level programs Servers can be designed to limit the number of open connections. For example, a server may wish to have only N socket connections at any point in time. As soon as N connections are made, the server will not accept another incoming connection until an existing connection is released. Explain how semaphores can be used by a server to limit the number of concurrent connections.

Explanation / Answer

Basically busy waiting is a scenario when a process looks for a condition repeatedly so it is busy to check the condition as well as it is waiting for it in this way a process will be in busy waiting condition. In other hand we can say when the processor is doing nothing but spending its clock cycle continuously and waiting for some event occurrence then the scenario will be called as busy waiting.

A process could wait for many reasons like for hardware to communicate, user, application. Processor can be in waiting condition in the scenario when process is ready for run but processor is busy.

Busy waiting can't be avoided altogether. But some time it can be avoided but it will incurs some associated overhead like putting the process in sleep and wake up.

Basically busy waiting is avoidable for single processor system and unavoidable for multiprocessor system.

Implementing synchronisation primitive by disabling interrupt is not appropriate for single processor system because if a user level program will be able to disable interrupt then it can disable the timer interrupt also which will effect the context switching.

A semaphore can be initialized to the socket connection which is allowable. When connection is accepting accquire() will be called and after releasing the connection relese() will be called. If the system will reach the highest number of allowable connections then it will block the acquire() method until Atleast one connection is released.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote