- Asked 2/22
- 2068 Baisakh (old course) · 6 marks
- 2067 Asar (old course) · 8 marks
Plug and play device configuration
Short answer
PnP BIOS isolates cards, reads resource needs (IRQ, DMA, I/O ports), resolves conflicts, and allocates non‑conflicting resources before booting the OS. Example: a sound card needing IRQ 5 or 7 and I/O 220h or 240h gets IRQ 7 and I/O 240h when a modem already uses IRQ 5 and I/O 220h.
Explain the plug and play (PnP) device configuration, with the steps to configure a PnP device, with example.
Plug and Play (PnP) is a standard in which the hardware, BIOS and operating system together detect an add-on device and automatically assign the resources it needs (IRQ, DMA channel, I/O port addresses, memory range), so that the user does not set jumpers or switches by hand and no two devices conflict.
Steps to configure a PnP device
- Power-on and POST: at power-on the PnP BIOS runs the power-on self-test and first activates only the boot devices (display, keyboard, boot disk) with default resources.
- Isolate the cards: the BIOS uses the PnP isolation protocol on the ISA bus. Each card has a unique serial identifier (vendor ID plus serial number). Cards are isolated one at a time and each is given a card select number (CSN).
- Read resource data: the BIOS reads each card's resource data (device ID and the resources it needs: IRQ lines, DMA channels, I/O port ranges, memory ranges, with alternatives).
- Detect legacy devices: the BIOS reads the saved configuration (ESCD) of fixed, non-PnP devices so that their resources are not reused.
- Resolve conflicts and allocate: the BIOS (or the operating system) builds a conflict-free map of IRQ, DMA, I/O and memory resources for all devices, using the alternatives that each card offers.
- Configure and activate: the chosen values are written into the configuration registers of each card, the cards are activated and the configuration is stored in the ESCD in non-volatile memory.
- Boot the OS: the operating system loads and finds the device drivers. It can reconfigure resources when a device is added or removed.
Power on -> POST -> isolate cards (CSN) -> read resource data
-> allocate IRQ/DMA/I/O/memory -> write to cards -> boot OS
Example
A PnP sound card is inserted. Its resource data says it needs one IRQ (5 or 7), one DMA channel (1 or 3) and an I/O range at 220h or 240h. A modem already uses IRQ 5 and I/O 220h. The BIOS reads these requests, avoids the conflict by giving the sound card IRQ 7, DMA 1 and I/O 240h, writes them to the card and activates it. The driver then uses these values without any user action.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Goals of plug and play BIOS · Computer Organization and Architecture, chapter 7
All Computer Organization and Architecture chapter 7 questions →