---
title: "Identifying the interrupting device"
subject: "Computer Organization and Architecture"
chapter: 7
key: "semester_5/computer_organization_and_architecture:interrupt-device-id"
source: https://www.bctengineer.com/q/semester_5/computer_organization_and_architecture/interrupt-device-id
site: BCT Engineering
---

# Identifying the interrupting device

Computer Organization and Architecture · Chapter 7: Input-Output Organization

- Asked in: 2073 Shrawan, 5 marks
- Video: [How Interrupts Work in Modern Computers](https://www.youtube.com/watch?v=G7bqvpAw7HE) — BitLemon
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/computer_organization_and_architecture/interrupt-device-id
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_organization_and_architecture/chapter-7

## Question

How does a computer know which device issued the interrupt? If multiple devices interrupt, how does the selection take place?

## Short answer

A device identifies itself via vectored interrupt (supplying a vector), separate interrupt lines, or software polling. For multiple interrupts, priorities are enforced by daisy chaining (nearest device wins), parallel priority encoder with mask register, or polling in priority order; a higher‑priority device can preempt a lower one.

## Answer

When an interrupt request reaches the CPU, the CPU must find **which device** raised it, and when several interrupt together, **which one to serve first**.

#### Identifying the interrupting device
1. **Software polling:** the CPU jumps to a common routine that reads the status flag of each device in turn. The first device with its flag set is the source. It is simple but slow.
2. **Vectored interrupt:** the device supplies a **vector** (an address or number) after the CPU acknowledges the interrupt. The CPU uses it to jump to that device's service routine directly. This is fast.
3. **Separate interrupt lines:** each device has its own request line, so the line itself identifies the device (used for few devices).

#### Selection among multiple interrupts
- **Daisy chain (serial priority):** devices are connected in series on the interrupt acknowledge line. The nearest device to the CPU has the highest priority. The first device with a pending request blocks the signal and sends its vector address.
- **Parallel priority:** an interrupt register and a mask register go to a priority encoder, which outputs the vector of the highest-priority unmasked request.
- **Software priority:** the polling routine tests devices in the order of priority.

A higher-priority device can interrupt the service routine of a lower-priority one, while lower-priority requests wait.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How does a vectored interrupt identify the device?
   A. The device supplies a vector (address or number) after acknowledgement and the CPU jumps to its routine
   B. The user selects the device
   C. The CPU uses the device's colour code
   D. The CPU tests each device's flag in turn
   Answer: A. The vector lets the CPU go directly to that device's service routine, which is fast. (Key point: Vectored interrupt)

2. What is the main drawback of software polling for identifying the interrupting device?
   A. It is slow because status flags are tested one by one
   B. It requires separate lines per device
   C. It cannot identify any device
   D. It needs a lot of hardware
   Answer: A. Polling is simple but slow as the CPU reads each device's flag in turn. (Key point: Software polling)

3. In a daisy chain, which device has the highest priority?
   A. A random device
   B. The slowest device
   C. The device nearest to the CPU on the acknowledge line
   D. The device farthest from the CPU
   Answer: C. The acknowledge signal starts at the nearest device, which gets the first chance to respond. (Key point: Daisy chain priority)

4. What does the priority encoder output in parallel priority?
   A. The vector of the highest-priority unmasked request
   B. The data to be transferred
   C. The status of all devices
   D. The vector of the lowest-priority request
   Answer: A. The interrupt and mask registers feed the encoder, which gives the highest-priority unmasked request's vector. (Key point: Parallel priority)

## Related in Computer Organization and Architecture

- [I/O module functions and priority interrupt](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Aio-module-priority-interrupt) — Computer Organization and Architecture, chapter 7, asked 3×
- [Instruction cycle state diagram with interrupt](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Ainstr-cycle) — Computer Organization and Architecture, chapter 1, asked 6×
- [Programmed vs interrupt-driven vs DMA](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Aio-techniques-compare) — Computer Organization and Architecture, chapter 7, asked 5×
- [DMA vs programmed and interrupt-driven I/O](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Adma-overcomes) — Computer Organization and Architecture, chapter 7, asked 3×
- [Types of priority interrupt](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Apriority-interrupt) — Computer Organization and Architecture, chapter 7
- [Plug and play device configuration](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Apnp-configure) — Computer Organization and Architecture, chapter 7, asked 2×

## Related in other subjects

- [Why hydration of cement takes place](https://www.bctengineer.com/question.md?key=semester_3%2Fcivil_engineering_materials%3Ahydration-of-cement-why) — Civil Engineering Materials, chapter 5
- [Memory devices; PAL vs PLA](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Apal-vs-pla) — Digital Logic, chapter 4
- [Arithmetic versus logical IF](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Afortran-arithmetic-vs-logical-if) — Computer Programming, chapter 11, asked 3×
- [Compare switch and if-else-if ladder](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Aswitch-vs-ifelse-ladder) — Computer Programming, chapter 5, asked 2×
