How many cycles per second does the processor spend


Question :

Suppose that in responding to interrupts from an I/O device the processor consumes 1000 cycles in performing the context switch required to transfer control to the interrupt handler. Servicing the device request takes an additional 10,000 cycles whether using interrupts or polling.

Once the interrupt processing is complete, another 1000 cycles are required to perform the context switch required to return from the interrupt handler and resume the program that was running. The device generates I/O requests at the rate of 150 per second (each request causes an interrupt).

a) How many cycles per second does the processor spend handling interrupts and processing requests from the device?

b) Consider an alternative to using interrupts in which a program polls the device for requests every 0.5ms. If this program is the only code running on the processor and each poll requires 500 cycles, how many cycles per second will the program spend on polling alone?

c) At what rate would the program have to poll the I/O device if the program is to consume the same number of cycles per second polling and servicing requests as were consumed using interrupts and servicing requests (as calculated in part a)?

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: How many cycles per second does the processor spend
Reference No:- TGS02935681

Expected delivery within 24 Hours