Types of Interrupts
1. Hardware Interrupts
- Generated by hardware devices, such as keyboard, mouse, or network interface.
- Examples:
- Keyboard interrupt: Generated when a key is pressed.
- Mouse interrupt: Generated when the mouse is moved or a button is clicked.
- Network interrupt: Generated when data is received over the network.
2. Software Interrupts
- Generated by software, such as a system call or exception.
- Examples:
- System call interrupt: Generated when a program makes a system call.
- Exception interrupt: Generated when an exception occurs, such as division by zero.
3. Maskable Interrupts
- Can be masked or disabled by the CPU.
- Examples:
- Keyboard interrupt: Can be masked to prevent keyboard input from interrupting the CPU.
4. Non-Maskable Interrupts (NMI)
- Cannot be masked or disabled by the CPU.
- Examples:
- System crash: An NMI can be generated when a system crash occurs.
5. Vectored Interrupts
- The interrupting device provides a vector (address) to the interrupt handler.
- Examples:
- Interrupt controller: Provides a vector to the interrupt handler.
6. Non-Vectored Interrupts
- The CPU uses a fixed address for the interrupt handler.
- Examples:
- Simple interrupt handler: Uses a fixed address for the interrupt handler.
No comments:
Post a Comment