Interrupts Flashcards
1
Q
What can provide an interrupt?
A
Interrupts can be provided by hardware or software
2
Q
When do hardware interrupts occur?
A
Hardware interrupts occur when devices indicate they need attention
3
Q
When do software interrupts occur?
A
When programs detect an error or illegal operation
4
Q
What happens when an interrupt takes place?
A
- Stores interrupted task
- Interrupt service routine is carried out
- Then the data is retrieved from the stack and the interrupted task continues
5
Q
How does the computer store the interrupted task?
A
-The values of each register and the PC are put onto the system stack
6
Q
How does the computer continue the interrupted task?
A
- The contents of the registers and program counter from the original task are restored from the stack they were placed on