FACTOID # 174: One in three Italian babies is born by caesarean section.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RELATED ARTICLES
People who viewed "Interrupts" also viewed:
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Interrupts

In computer engineering, 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.


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.


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 remain in modern computers because they permit a computer to have prompt responses to electronic events, while performing other work. Computer architectures also provide instructions to permit processes to initiate software interrupts or traps. This can be used, for instance, to implement cooperative multitasking.


The waiting still occurs. Normally, the computer's microcode continually tests for an interrupt.


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.


Interrupt Types

Typical interrupt types include:

  • timer interrupts
  • disk interrupts
  • power-off interrupts
  • traps

Other interrupts exist to transfer data bytes using UARTs, or Ethernet, sense key-presses, control motors, or anything else the equipment must do.


A classic timer interrupt just interrupts periodically from a counter or the power-line. The software (usually part of an operating system) counts the interrupts to keep time. The timer interrupt may also be used to reschedule the priorities of running processes. Counters are popular, but some older computers used the power line because power companies control the power-line frequency with an atomic clock.


A disk interrupt signals the completion of a data transfer from or to the disk peripheral. A process waiting to read or write a file starts up again.


A power-off interrupt predicts or requests a loss of power. It allows the computer equipment to perform an orderly shutdown.


Interrupts are also used in typeahead features for buffering events like keystrokes.


Interrupt routines generally have a short execution time. Most interrupt routines do not allow themselves to be interrupted, because they store saved context on a stack, and if interrupted many times, the stack could overflow. An interrupt routine frequently needs to be able to respond to a further interrupt from the same source. If the interrupt routine has significant work to do in response to an interrupt, and it is not critical that the work be performed immediately, then often the routine will do nothing but schedule the work for some later time and return as soon as possible. Some processors support a hierarchy of interrupt priorities, allowing a certain kinds of interrupts to occur while processing lower priority interrupts.


Processors also often have a mechanism referred to as interrupt disable which allows software to prevent interrupts from interfering with communication between interrupt-code and non-interrupt code. See mutual exclusion.


Typically, the user can configure the machine using hardware registers so that different types of interrupts are enabled or disabled, depending on what the user wants. The interrupt signals are And'ed with a mask, thus allowing only desired interrupts to occur. Some interrupts cannot be disabled - these are referred to as non-maskable interrupts.


Interrupt is also the name of a suspense novel written by author Toni Dwiggins in 1993.


  Results from FactBites:
 
Interrupt - Wikipedia, the free encyclopedia (752 words)
Software interrupts are usually implemented as instructions in the instruction set, which cause a context switch to the interrupt handler similarly to a hardware interrupt.
Interrupt in general sense means "breaking the flow of" and, as it is not known earlier, an asynchronous interrupt.
Interrupts may be implemented in hardware as a distinct system with control lines, or they may be integrated into the memory subsystem.
Interrupt class Reference (662 words)
We record whether interrupts are enabled or disabled, and any hardware interrupts that are scheduled to occur in the future.
Interrupt::ChangeLevel Change interrupts to be enabled or disabled, without advancing the simulated time (normally, enabling interrupts advances the time).
Interrupt::YieldOnReturn Called from within an interrupt handler, to cause a context switch (for example, on a time slice) in the interrupted thread, when the handler returns.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.