Difference between vectored and non vectored interrupts
Answers
Answered by
34
A vectored interrupt is where the CPU actually knows the address of the Interrupt Service Routine in advance. All it needs is that the interrupting device sends its unique vector via a data bus and through its I/O interface to the CPU. The CPU takes this vector, checks an interrupt table in memory, and then carries out the correct ISR for that device. So the vectored interrupt allows the CPU to be able to know what ISR to carry out in software (memory).
A non-vectored interrupt is where the interrupting device never sends an interrupt vector. An interrupt is received by the CPU, and it jumps the program counter to a fixed address in hardware. This is literally a hard coded ISR which is device agnostic. MIPS uses this via it’s syscall instruction, which is the same instruction you use regardless what device, if it is an external event notifier (e.g. keyboard input), a completion signal (e.g. print completion), a clock interrupt to tell the CPU to allocate control to a different device, or an abnormal event indicator (e.g. power failure). The CPU crucially does not know which device caused the interrupt without polling each I/O interface in a loop and checking the status register of each I/O interface to find the one with status “interrupt created”.
A non-vectored interrupt is where the interrupting device never sends an interrupt vector. An interrupt is received by the CPU, and it jumps the program counter to a fixed address in hardware. This is literally a hard coded ISR which is device agnostic. MIPS uses this via it’s syscall instruction, which is the same instruction you use regardless what device, if it is an external event notifier (e.g. keyboard input), a completion signal (e.g. print completion), a clock interrupt to tell the CPU to allocate control to a different device, or an abnormal event indicator (e.g. power failure). The CPU crucially does not know which device caused the interrupt without polling each I/O interface in a loop and checking the status register of each I/O interface to find the one with status “interrupt created”.
Answered by
0
Vectored interrupts are the ones in which the vector address is fixed while in non-vectored interrupts, it is seen that the vector address is not predefined.
Explanation:
- The differences between the vectored and non-vectored interrupts are given below:
Vectored interrupts:
- In this type of interrupt, the vector address of the interrupt is known to the CPU in advance.
- The device that has caused the interrupt sends its unique vector to the CPU through its I/O interface and through a data bus.
- This vector is taken by the CPU that checks the interrupt table in its memory and gives the correct ISR for that interrupting device.
- By vectored interrupt, the CPU is able to know the ISR to be carried out in the memory.
Non-vectored interrupts:
- In this type of interrupt, the vector address of the interrupt is not known as the interrupting device doesn't send this to the CPU.
- The CPU receives an interrupt and jumps the program counter to an address which is fixed in the hardware.
- This fixed address is a hard-coded ISR that is device agonistic.
- In this interrupt, the CPU doesn't know the interrupting device without polling every O/I interface and checking the status of each interface to search for the one with "interrupt created."
#SPJ2
Similar questions
English,
8 months ago
Math,
8 months ago
Accountancy,
8 months ago
Math,
1 year ago
Math,
1 year ago