Interrupts in Computer Architecture

Interrupts:

An interrupt is a signal to the processor to suspend the currently executing program, and run a specified routine. Whenever the execution of the routine is completed, the processor switches to its original program.

Interrupts are four types:
1. Program Interrupt
2. Time-Interrupt
3. I/O Interrupt
4. Hardware Interrupt

Program Interrupt:

This type of interrupt is generated by illegal instructions in the program, such as division by zero, arithmetic overflow and reference outside a user’s allowed memory space. Whenever the program interrupt happened the operating system sends a signal to the processor to suspend the currently executing job.

Time-Interrupt:

This type of interrupt is generated by a clock within the processor. Whenever the time slot of the processor expired, the operating system sends the interrupt signal to the processor to suspend the current job.

I/O Interrupt:

This type of interrupts are generated by I/O controller.
Examaple: If the CPU issue read command to the I/O module, the I/O module is ready at that time, and then the I/O module sends the interrupt signal to the CPU about the status.

Hardware Interrupt:

This type of interrupts are generated hardware components. If any hardware component fails due to a technical problem. They generate interrupts such as memory failure.