Define Interrupt and Their Types
Definition:
An interrupt is a signal sent to the processor by hardware or software indicating an event that needs
immediate attention. It temporarily halts the current operations, saves its state, and executes a
function called an interrupt handler (or ISR - Interrupt Service Routine) to deal with the event. Once
the ISR is executed, the processor resumes the interrupted task.
Types of Interrupts:
1. Hardware Interrupt:
These are generated by hardware devices (like keyboard, mouse, disk, etc.) to signal that they
require CPU attention.
2. Software Interrupt:
These are generated by programs or software to request a system call or for debugging purposes.
3. Maskable Interrupt:
These interrupts can be ignored or 'masked' by setting a bit in an interrupt mask register.
4. Non-Maskable Interrupt:
These are high-priority interrupts that cannot be disabled or ignored by the processor.
5. Vectored Interrupt:
In this type, the interrupt source provides the address of the ISR. It allows faster execution.
6. Non-Vectored Interrupt:
In this case, the address of the ISR is predefined and fixed for the interrupt.