Question: 9 . When an interrupt occurs, control must be transferred from the currently executing program to a subroutine ( the ISR ) that handles the
When an interrupt occurs, control must be transferred from the currently executing program to
a subroutine the ISR that handles the activity required to service the interrupt. For each
interrupt, a context switch is said to occur. Each context switch incudes transferring control as
well as saving or restoring any required registers. Assume that it takes clock cycles to
perform each context switch when an IO device triggers an interrupt. The interrupt service
routine ISR takes an additional cycles to service the device request. Once the device has
been serviced, the context switch needed to return from the interrupt handler back to the program
that was running also takes cycles. The CPU clock rate is GHz
a What is the maximum number of requests per second that a device can generate if the
system must complete all activity associated with each interrupt, including the context switches,
before the next interrupt occurs?
b Interrupt driven IO is used for a different device that issues evenly spaced requests
per second and transfers byte per request. A total of clock cycles are required to handle
each interrupt. Each instruction takes one clock cycle to execute. Part of each second is
consumed in handling interrupts. How many instructions can be executed in the remaining part
of each second that is not consumed by context switches and executing the interrupt handler?
c Suppose that instead of interrupt driven IO DMA is used to transfer one data block each
second. Each data block contains bytes of data. With DMA, it takes clock cycles to
setup and manage each block transfer including the context switches and interrupt handler. Each
instruction takes one clock cycle. How many instructions other than those required for IO can
the CPU execute each second?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
