q polling for an io completion is able to waste a


Q. Polling for an I/O completion is able to waste a large number of CPU cycles if the processor iterates a busy-waiting loop several times before the I/O completes. However if the I/O device is ready for service polling can be much more proficient than is catching and dispatching an interrupt. Explain a hybrid strategy that combines sleeping, polling, and interrupts for I/O device service. For every of these three strategies (pure polling, pure interrupts, hybrid) explain a computing environment in which that strategy is more efficient than is either of the others.

Answer: A hybrid approach could switch among polling and interrupts depending on the length of the I/O operation wait. For instance we could poll and loop N times and if the device is still busy at N+1 we could set an interrupt and sleep. This approach would evade long busy-waiting cycles. This process would be best for very long or very short busy times. It would be incompetent it the I/O completes at N+T (where T is a small number of cycles) because of the overhead of polling plus setting up and catching interrupts.

Pure polling is best with extremely short wait times. Interrupts are best with known long wait times.

Request for Solution File

Ask an Expert for Answer!!
Operating System: q polling for an io completion is able to waste a
Reference No:- TGS0327396

Expected delivery within 24 Hours