Interrupts
Auto-vectored Interrupts
- each interrupting device has a fixed vector - no INTA cycle - CPU loads ISR address of interrupting device directly into the PC to execute interrupt service routine (ISR)
Non-vectored interrupts
-Single, multi-drop interrupt request (IRQ) line - one interrupt service routine (ISR) for all interrupting devices - CPU determines interrupt source by polling service request (SRQ) flags
Maskable Interrupt
-can be masked (or disabled) through special bits - Global Interrupt Enable (GIE) - Interrupt (IE) enable bit of external I/O device
Vectored Interrupts
-requires an interrupt acknowledgement (INTA) cycle - interrupting device genereates an ID number (or vector) as part of the INTA cycle - The vector is used to determine the location of the interrupt service routine (ISR) in program memory
What are the steps of Interrupt handling?
1) CPU receives interrupt request 2)CPU saves state and clears GIE bit (disable maskable interrupts) 3) PC loaded with starting address of ISR for device that caused the interrupt 4)interrupt service routine is executed 5) CPU state restored and GIE bit set 6) Interrupted program resumed
When should the processor check for interrupts?
After the current instruction is completed
Define Interrupt
An event caused by an external I/O device.
Define Trap
An event generated internally by the processor. -Program requests a service from the operating system (also known as software interrupt) -internal signal indicates a trap
When can an interrupt occur?
At any time during program execution
What is the name of the code that runs when an interrupt occurs
Interrupt service routine (ISR). Also known as an interrupt handler or an exception handler.
What is the most common type of interrupt
Maskable
Identify the two types interrupts
Maskable and non-maskable
Identify three methods used for identifying interrupts
Non-vectored, Vectored, and Auto-vectored
Can Interrupts be prioritized
Yes
Define Exception
an event generated internally by the processor. Usually the result of an erroneous condition encountered during program execution (ex. divide by zero, overfow..)
What is the name of the table that handles interrupts
the interrupt vector table (IVT)