Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
A processor receives interrupts each second from its devices. Each interrupt service routine takes microseconds () to run.
The processor checks for interrupts at the end of each fetch-decode-execute cycle. If an interrupt has a higher priority than the task, it saves the state of the task (the register contents). It runs the interrupt service routine (ISR) for that interrupt, then restores the state and carries on. The highest priority interrupt is serviced first.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Step 1. Time in the routines. .
Step 2. As a percentage. .
Step 3. Why short. While a routine runs, the task is paused. Many interrupts arrive each second, so long routines would leave little time for the task, and the computer would feel slow.
Answer: (a) . (b) . (c) So the paused task gets most of the processor's time.
Check. of a second is s, and .
Log in to join the discussion.
Loading…