- Asked 3/19
- 2071 Magh · 8 marks
- 2072 Asoj · 5 marks
- 2078 Baisakh · 5 marks
Interrupt-driven I/O with vectored interrupt
Short answer
In vectored interrupt I/O, the peripheral asserts an interrupt. The CPU acknowledges and the peripheral sends a vector number on the data bus. The CPU uses the vector to index into the interrupt vector table to find the ISR. The ISR reads data from the peripheral and writes to memory, then returns, avoiding polling.
Explain the operation of interrupt-driven I/O using vectored interrupt (write down each step for peripheral to memory transfer without DMA using vectored interrupt).
In interrupt-driven I/O with a vectored interrupt, the peripheral supplies the processor with a number (the interrupt vector) that identifies which interrupt service routine (ISR) to run. The processor does not need to poll the devices, and the ISR location is not fixed.
Example: a peripheral transfers a byte to memory without DMA. The data is in the peripheral register Reg, and the ISR copies it to memory address 500.
Flow of actions
Processor Peripheral Memory
| main program running | |
|<---- Int (request) ----| |
|----- Inta (ack) ------>| |
|<--- Vector (data bus) -| |
| look up IVT, ISR addr | |
| save PC, jump to ISR | |
| ISR: read Reg -> store |-------------->| M[500]=data
| return, restore PC | |
Steps
- The processor is executing its main program (e.g. the instruction at PC = 100).
- The peripheral has data ready and asserts the interrupt request Int to the processor.
- The processor finishes the current instruction and, if interrupts are enabled, saves the PC (and flags) on the stack.
- The processor asserts Inta (interrupt acknowledge) on the control bus.
- The peripheral puts its interrupt vector number (or the ISR address) on the data bus and removes Int.
- The processor reads the vector, finds the ISR address in the interrupt vector table (IVT) (at vector x entry size), and loads it into the PC.
- The ISR executes: it reads the data from the peripheral register (e.g. R0 = Reg) and writes it to memory (M[500] = R0).
- The ISR ends with a return-from-interrupt instruction; the processor restores the PC (and flags) from the stack and resumes the main program.
Advantage: several devices can each supply their own vector, so the processor reaches the right ISR without polling; this is more flexible than a fixed ISR location. Disadvantage: the device needs hardware to supply the vector, and the processor is still involved in every transfer.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- DMA controller and flow of actions · Embedded System, chapter 5 · asked 3×
- Interrupt and fixed ISR flow of actions · Embedded System, chapter 5
- Arbitration and memory-mapped vs standard I/O · Embedded System, chapter 5
- Programmed vs interrupt-driven vs DMA · Computer Organization and Architecture, chapter 7 · asked 5×
- DMA vs programmed and interrupt-driven I/O · Computer Organization and Architecture, chapter 7 · asked 3×
- Interrupt driven data transfer · Instrumentation II, chapter 1 · asked 2×
- Compare status check I/O, interrupt I/O and DMA · Instrumentation II, chapter 1