Interrupt

An interrupt is a signal sent to the processor that interrupts the current process. It may be generated by a hardware device or a software program.

A hardware interrupt is often created by an input device such as a mouse or keyboard. For example, if you are using a word processor and press a key, the program must process the input immediately. Typing "hello" creates five interrupt requests, which allows the program to display the letters you typed. Similarly, each time you click a mouse button or tap on a touchscreen, you send an interrupt signal to the device.

An interrupt is sent to the processor as an interrupt request, or IRQ. Each input device has a unique IRQ setting, or priority. This prevents conflicts and ensures common input devices, such as keyboards and mice, are prioritized.

Software interrupts are used to handle errors and exceptions that occur while a program is running. For example, if a program expects a variable to be a valid number, but the value is null, an interrupt may be generated to prevent the program from crashing. It allows the program to change course and handle the error before continuing. Similarly, an interrupt can be used to break an infinite loop, which could create a memory leak or cause a program to be unresponsive.

Both hardware and software interrupts are processed by an interrupt handler, also called an interrupt service routine, or ISR. When a program receives an interrupt request, the ISR handles the event and the program resumes. Since interrupts are often as brief as a keystroke or mouse click, they are often processed in less than a millisecond.

Updated March 17, 2018 by Per C.

quizTest Your Knowledge

What group of numbers includes rational and irrational numbers?

A
Whole numbers
0%
B
Real numbers
0%
C
Natural numbers
0%
D
Imaginary numbers
0%
Correct! Incorrect!     View the Real Number definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of Interrupt on this page is an original definition written by the TechTerms.com team. If you would like to reference this page or cite this definition, please use the green citation links above.

The goal of TechTerms.com is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about this definition or would like to suggest a new technical term, please contact us.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.