Session2-Interrupts
Session2-Interrupts
In the above figure 4.4, it has been shown that the interrupt
request arrives during execution of the ith instruction of the program
1 (i.e. COMPUTE routine) and then the CPU suspends the
execution of the current program being executed, i.e. COMPUTE
Routine and saves the address of the next instruction i.e. (i+1)th
instruction (or you can say the current content of the program
counter) and saves any other relevant information to the processor
current activity in the temporary storage. Then, the CPU loads the
program counter with the base address/ address of the first
instruction of the interrupt service routine, i.e. PRINT Routine and
executes the PRINT routine. After finishing the execution of the
interrupt service routine, the CPU will load the program counter
with address of the i+1th instruction of COMPUTE Routine that is
already saved in temporary storage and get back for the execution
of the COMPUTE routine, starting from the i+1th instruction.
At this point, we are very much familiar with what an interrupt is,
what an interrupt request signal is, what an interrupt
acknowledgement signal is, what an interrupt service routine is,
types of interrupt and how to handle an interrupt. So, it is the time
to handle multiple interrupt as it is possible to occur at the same
time, because it is possible for occurring other interrupts while one
interrupt service routine is being processed. So, there should have
a module that can handle the interrupt requests from various
devices and allow one by one to the processor and is known as
Interrupt Controller. Basically, there are two methods for handling
multiple interrupts and they are as follows-
6. Store the result back into the memory or out through the I/O