written 3.1 years ago by | modified 3.1 years ago by |
Discuss what it means by interrupts in computer architecture and explain the mechanisms for interrupt handling of l/O operations
written 3.1 years ago by | modified 3.1 years ago by |
Discuss what it means by interrupts in computer architecture and explain the mechanisms for interrupt handling of l/O operations
written 3.1 years ago by |
Interrupt: An interrupt is an asynchronous input to the synchronous system. It is one of the methodologies of getting the CPU's attention. If the processor is triggered with an interrupt then the processor responds by suspending its current activities, saving its state, and executing a function called an interrupt handler to deal with the event.
The interruption is temporary, and, after the interrupt handler finishes, the processor resumes normal activities.
There are two types of interrupts:
Each interrupt has its own interrupt handler.
We know that the instruction cycle consists of fetch, decode, execute and read/write functions. After every instruction cycle, the processor will check for interrupts to be processed if there is no interrupt is present in the system it will go for the next instruction cycle which is given by the instruction register.
If there is no interrupt present it will trigger the interrupt handler, the handler will stop the present instruction which is processing and save its configuration in a register and load the program counter of the interrupt from a location that is given by the interrupt vector table. After processing the interrupt by the processor interrupt handler will load the instruction and its configuration from the saved register, process will start its processing where it's left. This saving the old instruction processing configuration and loading the new interrupt configuration is also called context switching.