Suppose that a 1GHZ processor needs to read 1000 bytes of data from a particular I/O device. The I/O device supplies 1 byte of data every 0.02ms. The code to process the data and store it in a buffer takes 1000 cycles.
. if the processor detects that a byted of data is ready through polling, and a polling iteration takes 60 cycles, how many cycles does the entire operation takes?
. if instead, the processor is interrupted when a byte is ready, and the processor spends the time between interrupts on another task, how many cycles of this other task can the processor complete while the I/O communication is taking place? the overhead for handling an interrupt is 200 cycles