written 8.0 years ago by | • modified 8.0 years ago |
Mumbai University > Electronics Engineering > Sem 7 > Embedded System Design
Marks: 5 Marks
Year: Dec 2015
written 8.0 years ago by | • modified 8.0 years ago |
Mumbai University > Electronics Engineering > Sem 7 > Embedded System Design
Marks: 5 Marks
Year: Dec 2015
written 8.0 years ago by |
Interrupts:
The ISR processes the event, and, upon completion of the ISR, the program returns to:
a. The background for a foreground/background system,
b. The interrupted task for a non-preemptive kernel, or
c. The highest priority task ready to run for a preemptive kernel.
Interrupts allow a microprocessor to process events when they occur, which prevents the microprocessor from continuously polling (looking at) an event to see if it has occurred. Microprocessors allow interrupts to be ignored and recognized through the use of two special instructions: disable interrupts and enable interrupts, respectively.
Factors contributing to interrupt response:
Interrupt response is defined as the time between the reception of the interrupt and the start of the ISR that handles the interrupt. The interrupt response time accounts for all of the overhead involved in handling an interrupt. Typically, the processor’s context (CPU registers) is saved on the stack before the ISR is executed.
Interrupt response time = Interrupt latency+ Time to save the CPU’s context + Execution time of the kernel ISR entry function
Interrupt latency is a factor found to be common in all the types of systems for increasing the interrupt response time.
Interrupt latency is dependent on the amount of time; the kernel disables the interrupt and is given by the equation:
Interrupt latency = Maximum amount of time interrupts are disabled + Time to start executing the first instruction in the ISR