Exam-style question
Try this first
Which sequence best describes the processor's response to an interrupt?.
- A.Ignore the interrupt, delete the current program, then start the ISR
- B.Save the volatile environment, execute the ISR, then restore the interrupted execution
- C.Execute the ISR, overwrite the current program, then save the volatile environment
- D.Restart the processor, execute the original program from the beginning, then ignore the ISR
Model answer
What a good answer should say
- Save the volatile environment, execute the ISR, then restore the interrupted execution
Explanation
Why this works
The volatile environment is saved so that the processor can service the interrupt and subsequently return to the interrupted program with its execution state preserved.
Common mistake
No common mistake is linked to this question yet.
