interrupt handler

(redirected from Interrupt service routine)
Also found in: Acronyms.

interrupt handler

[′int·ə‚rəpt ‚hand·lər]
(computer science)
A section of a computer program or of the operating system that takes control when an interrupt is received and performs the operations required to service the interrupt.

interrupt handler

(software)
A routine which is executed when an interrupt occurs. Interrupt handlers typically deal with low-level events in the hardware of a computer system such as a character arriving at a serial port or a tick of a real-time clock. Special care is required when writing an interrupt handler to ensure that either the interrupt which triggered the handler's execution is masked out (inhibitted) until the handler exits, or the handler is re-entrant so that multiple concurrent invocations will not interfere with each other.

If interrupts are masked then the handler must execute as quickly as possible so that important events are not missed. This is often arranged by splitting the processing associated with the event into "upper" and "lower" halves. The lower part is the interrupt handler which masks out further interrupts as required, checks that the appropriate event has occurred (this may be necessary if several events share the same interrupt), services the interrupt, e.g. by reading a character from a UART and writing it to a queue, and re-enabling interrupts.

The upper half executes as part of a user process. It waits until the interrupt handler has run. Normally the operating system is responsible for reactivating a process which is waiting for some low-level event. It detects this by a shared flag or by inspecting a shared queue or by some other synchronisation mechanism. It is important that the upper and lower halves do not interfere if an interrupt occurs during the execution of upper half code. This is usually ensured by disabling interrupts during critical sections of code such as removing a character from a queue.
References in periodicals archive ?
The string printed is chosen dependent on whether or not the interrupt service routine incremented a global variable.
In order to demonstrate this, we would have to extend our modifications to include multiple polling threads, and we may have to modify the interface drivers to support concurrency in what were originally interrupt service routines (which are not run concurrently in the original system).
However, the user does not yet have assignments for the breakpoint Interrupt Service Routine and the Setup .
In both preemptive and cooperative mode, the scheduler operates as a periodical timer interrupt service routine. In the cooperative mode, the timer interrupt service routine (ISR) has only the purpose to increment the system time.
Code generated by a compiler without OCG technology results in an average of 108 cycles to execute the interrupt service routine and main loop overhead for each byte of data.
Then, programmers who work with an Ethernet port need only deal with transmit and receive message buffers and an interrupt service routine (ISR).
A unique L2 private memory mode allows system designers the choice of operating the processor's L2 cache as either a fast backside cache or as high-speed system memory, ideal for storing interrupt service routines or critical data structures.
StackX analyzes a program's executable file, mapping all function calls, interrupt service routines, local variables, and any other factors to enable calculation of each thread's maximum stack memory requirements.
Simple interrupt service routines (ISRs) improve performance and ease maintenance.