THEORY - 39 : -IRQ, DMA, Memory Address, IO address, Resource Conflict, Plug & Play Concept.

ICTSM 2nd Year Theory - 34

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

Memory Address:

A unique hexadecimal location number in RAM or ROM. The CPU uses it to read or write data stored in system memory.

I/O Address (Input/Output Port):

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.

Common Symptoms: System crashes/BSOD, freezing, device non-functionality, or yellow warning marks (!) in Windows Device Manager.

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:
  1. Detection: System automatically detects new connected hardware.
  2. Allocation: Assigns available IRQ, DMA, and I/O addresses automatically.
  3. 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