0
2.6kviews
What are interrupts? Explain the factors that contribute to interrupt response time in a system.
1 Answer
0
33views

An interrupt is defined as an asynchronous event that stops normal routine of microprocessor/ microcontroller and forces it to execute ISR (Interrupt Service Routine).

Whenever an interrupt is acknowledged the current execution is completed. Address of next instruction is saved on stack. The ISR is executed and after its execution the control returns to main program.

There are 3 types of interrupts-

  • External I/O device or hardware interrupts.
  • Software runtime exception or traps that cause error condition.
  • Software interrupt – execution of certain instruction.

The factors that contribute to interrupt response time in a system are -

1. ISR (Interrupt Service Routine):

  • There is a subroutine written for servicing ISR.
  • The location of ISR in the IVT (Interrupt Vector Table). And IVT in is the memory.
  • In microprocessor/ microcontroller, there are fixed predefined interrupt vector addresses for each interrupt source.

2. Interrupt Priorities:

  • When multiple interrupt requests come at the same time or one request is being serves and another request comes, then in such cases the need for priorities arises.
  • Non-maskable interrupts and software interrupts have high priority.
  • General purpose interrupts have low priority.
  • Vectored interrupts have high priority whereas non-vectored interrupts have low priority.

3. Interrupt Nesting:

  • When a high priority interrupt interrupts a low priority ISR, then it is known as interrupt nesting.
  • If a high priority ISR is executing and a low priority interrupt comes in, then the higher priority ISR is finished first and then the lower priority ISR is executed.
  • Interrupt nesting is useful and effective in real time embedded systems where devices may require urgent service from processor.

4. Interrupt Latency:

The time gap between the occurrence of interrupt and beginning of execution of corresponding ISR is called interrupt latency. Following methods are used to reduce interrupt latency-

  • Short interrupt routines – Waiting time for same or lower priority interrupt is reduced.
  • Disabling interrupt for short period of time.
  • Usage of nested interrupt ladder – allows further interrupt to occur while servicing exiting.
  • Prioritize interrupts – Give time to lower interrupts until higher priority interrupt occurs. Therefore, higher priority interrupt provides lower or average interrupt latency.
Please log in to add an answer.