The details of an interrupt cycle are shown in figure.

Given that an interrupt input arrives every msec, what is the percentage of the total time that the CPU devotes for the main program execution.
View worked solution
Answer: 90.00
From the standard interrupt cycle diagram for this question, the total time spent on handling a single interrupt is divided into three phases:
- Save CPU status / Context save:
- Interrupt Service Routine (ISR) execution:
- Restore CPU status / Context restore:
Thus, the total time consumed per interrupt cycle is:
Given that an interrupt arrives every :
- Time spent on the main program in each interval =
- Percentage of total time devoted to the main program =
Free practice · Your answers on this page are not saved.
