A printer runs out of paper while the user is watching a video. Describe what the CPU does.
- The printer sends a hardware interrupt signal to the CPU.
- The CPU finishes its current cycle, checks the priority, and saves the contents of its registers for the video task.
- It runs the interrupt service routine for the printer, which shows an 'out of paper' message.
- The saved register contents are restored and the video carries on.
Answer: The interrupt is handled by its ISR, then the video task continues from where it stopped.