Interrupts are mainly 3 types
- External Interrupt
- Hardware Interrupt
- Software Interrupt
External Interrupt come from I/O devices or from any other external source.Examples of External Interrupts are power failure, I/O device requesting transfer of data, I/O device finished transfer of data etc.
Internal interrupts arise from illegal or erroneous use of an instruction or data. Internal Interrupts are also called traps. Examples of Internal interrupts are stack overflow, register overflow, attempt to divide by zero etc.
Software Interrupt is initiated by executing an instruction. Software Interrupt is a special call instruction that behaves like an interrupt rather than an subroutine call. It can be used by a programmer to initiate an interrupt procedure at any desired point in the program. A software interrupt often occurs when an application software terminates or when it requests the operating system for some service.