Interrupt latency

Interrupt latency

In Realtime Operating Systems, Interrupt latency is the time between the generation of an interrupt by a device and the servicing of the device which generated the interrupt. For many operating systems, devices are serviced as soon as the device's interrupt handler is executed. Interrupt latency may be affected by interrupt controllers, interrupt masking, and the operating system's (OS) interrupt handling methods.

Background

There is usually a tradeoff between interrupt latency, throughput, and processor utilization. Many of the techniques of CPU and OS design that improve interrupt latency will decrease throughput and increase processor utilization. Techniques that increase throughput may increase interrupt latency and increase processor utilization. Lastly, trying to reduce processor utilization may increase interrupt latency and decrease throughput.

Minimum interrupt latency is largely determined by the interrupt controller circuit and its configuration. They can also affect the jitter in the interrupt latency, which can drastically affect the real-time schedulability of the system. The Intel APIC Architecture is well known for producing a huge amount of interrupt latency jitter.

Maximum interrupt latency is largely determined by the methods an OS uses for interrupt handling. For example, most processors allow programs to disable interrupts, putting off the execution of interrupt handlers, in order to protect critical sections of code. During the execution of such a critical section, all interrupt handlers that cannot execute safely within a critical section are blocked (they save the minimum amount of information required to restart the interrupt handler after all critical sections have exited). So the interrupt latency for a blocked interrupt is extended to the end of the critical section, plus any interrupts with equal and higher priority that arrived while the block was in place.

Many computer systems require low interrupt latencies, especially embedded systems that need to control machinery in real-time. Sometimes these systems use a real-time operating system (RTOS). A RTOS makes the promise that no more than an agreed upon maximum amount of time will pass between executions of subroutines. In order to do this, the RTOS must also guarantee that interrupt latency will never exceed a predefined maximum.

Considerations

There are many methods that hardware may use to increase the interrupt latency that can be tolerated. These include buffers, and flow control. For example, most network cards implement transmit and receive ring buffers, interrupt rate limiting, and hardware flow control. Buffers allow data to be stored until it can be transferred, and flow control allows the network card to pause communications without having to discard data if the buffer is full.

Modern hardware also implements interrupt rate limiting. This helps prevent interrupt storms or "live lock" by having the hardware wait a programmable minimum amount of time between each interrupt it generates. Interrupt rate limiting reduces the amount of time spent servicing interrupts, allowing the processor to spend more time doing useful work. Exceeding this time results in a soft (recoverable) or hard (non-recoverable) error.

See also

* Advanced Programmable Interrupt Controller
* Programmable Interrupt Controller
* IEEE 802.3 (802.3x PAUSE frames for flow control)
* Ethernet flow control
* Inter-Processor Interrupt
* Interrupt
* Interrupt Handler
* Non-Maskable Interrupt


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Latency (engineering) — Latency is a measure of time delay experienced in a system, the precise definition of which depends on the system and the time being measured. Latencies may have different meaning in different contexts. Contents 1 Communication latency 1.1 Packet …   Wikipedia

  • Interrupt — This article is about computer interrupts. For the study of the effect of disruptions on job performance, see Interruption science. In computing, an interrupt is an asynchronous signal indicating the need for attention or a synchronous event in… …   Wikipedia

  • Interrupt storm — In operating systems, an interrupt storm is an event during which a processor receives an inordinate number of interrupts that consume the majority of the processor s time. Interrupt storms are typically caused by hardware devices that do not… …   Wikipedia

  • Interrupt handler — An interrupt handler, also known as an interrupt service routine (ISR), is a callback subroutine in an operating system or device driver whose execution is triggered by the reception of an interrupt. Interrupt handlers have a multitude of… …   Wikipedia

  • Interrupt priority level — The interrupt priority level (IPL) is a part of the current system interrupt state, which indicates the interrupt requests that will currently be accepted. The IPL may be indicated in hardware by the registers in a Programmable Interrupt… …   Wikipedia

  • Interrupt vector — An interrupt vector is the memory address of an interrupt handler, or an index into an array called an interrupt vector table or dispatch table . Interrupt vector tables contain the memory addresses of interrupt handlers. When an interrupt is… …   Wikipedia

  • Programmable Interrupt Controller — A Programmable Interrupt Controller (PIC) is a device which allows priority levels to be assigned to its interrupt outputs. When the device has multiple interrupt outputs to assert, it will assert them in the order of their relative priority.… …   Wikipedia

  • Advanced Programmable Interrupt Controller — In computing, an Advanced Programmable Interrupt Controller (APIC) is a more complex Programmable Interrupt Controller (PIC) than Intel s original types such as the 8259A. APIC devices permit more complex priority models, and Advanced IRQ… …   Wikipedia

  • Non-maskable interrupt — A non maskable interrupt (NMI) is a computer processor interrupt that cannot be ignored by standard interrupt masking techniques in the system. It is typically used to signal attention for non recoverable hardware errors. (Some NMIs may be masked …   Wikipedia

  • CAS Latency Time — Dieser Artikel beschreibt den DRAM Chip. Für das mit diesen Chips aufgebaute DRAM Modul (ugs.: Speicherriegel), siehe Artikel Speichermodul. Dynamic Random Access Memory (DRAM), oder der halb eingedeutschte Begriff Dynamisches RAM, bezeichnet… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”