Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
In a model, each key press sends one hardware interrupt to the processor. A writer types words a minute for minutes. Each word, with the space after it, takes key presses.
An interrupt is a signal to the processor that something needs attention now. A hardware interrupt comes from a device: pressing a key, moving the mouse. A software interrupt comes from a program: division by zero, two processes trying to access the same memory location.
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. Key presses each minute. .
Step 2. Over minutes. interrupts.
Step 3. The kind. The signal comes from the keyboard, which is a device. So it is a hardware interrupt.
Answer: (a) interrupts. (b) It is sent by a device, the keyboard.
What if? Each interrupt is handled in a tiny fraction of a second, so the writer never notices the processor stopping.
Log in to join the discussion.
Loading…