Microsoft Store
 

Interrupt


 

In computer science, an interrupt is a signal from a device which typically results in a context switch: that is, the processor sets aside what it's doing and does something else.

Related Topics:
Computer science - Context switch

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Digital computers usually provide a way to start software routines in response to asynchronous electronic events. These events are signaled to the processor via interrupt requests (IRQ). The processor and interrupt code make a context switch into a specifically written piece of software to handle the interrupt. This software is called the interrupt service routine, or interrupt handler. The addresses of these handlers are termed interrupt vectors and are generally stored in a table in RAM, allowing them to be modified if required.

Related Topics:
Computer - Asynchronous - Processor - IRQ - Context switch - Interrupt handler - Interrupt vector - RAM

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Interrupts were originated to avoid wasting the computer's valuable time in software loops (called polling loops) waiting for electronic events. Instead, the computer was able to do other useful work while the event was pending. The interrupt would signal the computer when the event occurred, allowing efficient accommodation for slow mechanical devices.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Interrupts allow modern computers to respond promptly to electronic events, while other work is being performed. Computer architectures also provide instructions to permit processes to initiate software interrupts or traps. These can be used, for instance, to implement co-operative multitasking.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

A well-designed interrupt mechanism arranges the design of the computer bus, software and interrupting device so that if some single part of the interrupt sequence fails, the interrupt restarts and runs to completion. Usually there is an electronic request, an electronic response, and a software operation to turn off the device's interrupt, to prevent another request.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~