Interrupts Flashcards
What are Hardware interrupts?
Hardware interrupts occur when devices indicate they need attention; for example, mouse button pressed.
What are Software interrupts?
Software interrupts occur when programs detect an error or illegal operation.
What happens when an interrupt is generated?
When an interrupt is generated, the operating system executes an interrupt service routine; so, if the interrupt is high priority, it causes the fetch-execute cycle to be immediately interrupted after the completion of the current instruction
What is a store interrupted task?
- Current instruction finishes its execution
- Program counter contents stored in memory
- Register contents stored in memory
What is an Interrupt service routine carried out?
- Interrupt number examined and source of interrupt identified
- Program counter loaded with start address for interrupt service routine
- Interrupt service routine is executed
What is a continue interrupt service?
- Contents of registers from original task restored to memory
- Program counter contents from original task restored
- Interrupted task continues
What happens when a hardware or software interrupt is generated?
- When a hardware or software interrupt is generated, the processor checks the priority of the interrupt.
- If the interrupt is a higher priority than the current process, then it will be stopped at the completion of the current instruction to deal with the interrupt.
- Once the interrupt has been dealt with, the interpreted process continues until completion.