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.
(2002-07-24)

Read Also:

  • Interrupter

    [in-tuh-ruhp-ter] /ˌɪn təˈrʌp tər/ noun 1. a person or thing that . 2. Electricity. a device for or periodically opening and closing a circuit, as in a doorbell. /ˌɪntəˈrʌptə/ noun 1. a person or thing that interrupts 2. an electromechanical device for opening and closing an electric circuit

  • Interruptible

    [verb in-tuh-ruhpt; noun in-tuh-ruhpt] /verb ˌɪn təˈrʌpt; noun ˈɪn təˌrʌpt/ verb (used with object) 1. to cause or make a break in the continuity or uniformity of (a course, process, condition, etc.). 2. to break off or cause to cease, as in the middle of something: He interrupted his work to answer the bell. 3. […]

  • Interrupting

    [verb in-tuh-ruhpt; noun in-tuh-ruhpt] /verb ˌɪn təˈrʌpt; noun ˈɪn təˌrʌpt/ verb (used with object) 1. to cause or make a break in the continuity or uniformity of (a course, process, condition, etc.). 2. to break off or cause to cease, as in the middle of something: He interrupted his work to answer the bell. 3. […]

  • Interruption

    [in-tuh-ruhp-shuh n] /ˌɪn təˈrʌp ʃən/ noun 1. an act or instance of . 2. the state of being . 3. something that . 4. cessation; intermission. /ˌɪntəˈrʌpʃən/ noun 1. something that interrupts, such as a comment, question, or action 2. an interval or intermission 3. the act of interrupting or the state of being interrupted […]

  • Interruptions

    [in-tuh-ruhp-shuh n] /ˌɪn təˈrʌp ʃən/ noun 1. an act or instance of . 2. the state of being . 3. something that . 4. cessation; intermission. /ˌɪntəˈrʌpʃən/ noun 1. something that interrupts, such as a comment, question, or action 2. an interval or intermission 3. the act of interrupting or the state of being interrupted […]


Disclaimer: Interrupt handler definition / meaning should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional. All content on this website is for informational purposes only.