Interrupt and Its Types
Interrupt and Its Types
Introduction to Interrupts
An interrupt is a signal sent by hardware or software to the processor, indicating that an
immediate attention or response is needed. Interrupts help manage CPU execution by
temporarily pausing the current process, handling the request, and then resuming execution.
Interrupts improve efficiency in a system by allowing the CPU to handle multiple tasks
simultaneously rather than waiting for slow I/O operations to complete.
Types of Interrupts
Interrupts can be broadly classified into two main categories:
1. Hardware Interrupts
These are generated by external hardware devices, such as keyboards, printers, and network
cards, to get the attention of the CPU. They are further divided into:
a) Maskable Interrupts
● Example: Interrupt Request (IRQ) signals from peripherals like a sound card or
USB device.
b) Non-Maskable Interrupts (NMI)
2. Software Interrupts
These are triggered by software instructions rather than external hardware. They help in
system calls and exception handling.
a) System Call Interrupts
b) Exception Interrupts
● These occur when a program violates certain rules, causing the CPU to take
immediate action.