PC Hardware Resources & Plug & Play Concept
Quick revision notes on IRQ, DMA, Memory Address, I/O Address, Resource Conflict, and Plug & Play (P&P).
1. IRQ (Interrupt Request)
An IRQ is a hardware signal sent to the CPU when a device (like a keyboard, mouse, or printer) needs immediate attention.
- How it works: The CPU pauses its current task, handles the request using an Interrupt Service Routine (ISR), and then goes back to its work.
- Lines: Traditional systems used 16 IRQ lines (IRQ 0 to 15).
- Modern PC: Uses APIC, which allows multiple devices to share an IRQ line without issues.
2. DMA (Direct Memory Access)
DMA allows high-speed devices (like hard drives or sound cards) to transfer data directly to and from system RAM without burdening the CPU.
- Main Benefit: Saves CPU processing power and speeds up data transfers.
- Modern Feature: Modern PCIe devices use Bus Mastering to manage DMA transfers directly.
3. Memory Address vs. I/O Address
A unique hexadecimal location number in RAM or ROM. The CPU uses it to read or write data stored in system memory.
A unique port number (e.g., 03F8) used by the CPU to send commands and exchange data directly with a hardware device.
4. Resource Conflict
Occurs when two or more devices try to use the same IRQ, DMA channel, or I/O address at the same time.
5. Plug & Play (P&P) Concept
Plug & Play allows the OS and BIOS to automatically detect and configure new hardware without manual setting changes (like setting jumpers).
3-Step P&P Process:- Detection: System automatically detects new connected hardware.
- Allocation: Assigns available IRQ, DMA, and I/O addresses automatically.
- Driver Loading: Loads the correct driver so the hardware works immediately.
Quick Revision Table
| Resource | Function | Modern Solution |
|---|---|---|
| IRQ | Hardware signal requesting CPU attention | APIC (IRQ Sharing) |
| DMA | Direct device-to-RAM data transfer | Bus Mastering |
| Memory Address | Specific memory location in RAM/ROM | OS Virtual Memory Manager |
| I/O Address | Port for CPU-to-device communication | Plug & Play Mapping |
| Plug & Play | Auto hardware detection and setup | ACPI Firmware & OS Manager |