Monday, December 19, 2011

Interrupts

Why Interrupts are required.Discuss ISR.Also explain types of interrupts.

Concepts:
1]Interrupts
Interrupt is an asynchronous signal indicating the need for attention or a synchronous event in software indicating the need for a change in execution.A hardware interrupt causes the processor to save its state of execution and begin execution of an interrupt handler. Software interrupts are usually implemented as instructions in the instruction set, which cause a context switch to an interrupt handler similar to a hardware interrupt.Interrupts are a commonly used technique for computer multitasking, especially in real-time computing. Such a system is said to be interrupt-driven.


2]Interrupt Request --The part of a program (usually firmware, driver or operating system service) that deals with the interrupt is referred to as an interrupt service routine (ISR) or interrupt handler.

3]Interrupt Handler:

An interrupt handler, also known as an interrupt service routine (ISR), is a callback subroutine in microcontroller firmware, operating system or device driver whose execution is triggered by the reception of an interrupt.

General Sequence Followed When Interrupts Occur By an External Device

  1. Interrupt request(IRQ) signal is sent by the device to the processor.
  2. If the interrupt line is enabled the following sequence of events occur in the system, else the interrupt is ignored. The processor completes its present instruction (if any) and pay attention to the IRQ.
  3. It stores the address of the next location and content of status register to the stack
  4. It informs the device that its request has been granted and in response the device de-activates its IRQ.
  5. Using some suitable technique the processor loads its program counter(PC) with address of the ISR.
  6. With return statement occurring at the end of the ISR all stored content is loaded back into the respective registers and the processor resumes its suspended program

5 comments:

  1. http://en.wikipedia.org/wiki/Interrupt

    ReplyDelete
  2. http://en.wikipedia.org/wiki/Interrupt_handler

    ReplyDelete
  3. http://en.wikipedia.org/wiki/Interrupt_request

    ReplyDelete
  4. what happens when a interrupt is received..
    what is contained inside an interrupt handler

    ReplyDelete
  5. http://en.wikipedia.org/wiki/Interrupt_latency

    ReplyDelete