🖥️ Direct Memory Access & I/O Processors

⚡
Direct Memory Access (DMA)

DMA represents the most sophisticated method for transferring large blocks of data between high-speed peripheral devices and main memory without constant CPU involvement.

❌ Programmed I/O

CPU handles every transfer

Slow & CPU intensive

🔔 Interrupt I/O

CPU interrupted for each word

Better but still limiting

✅ DMA

Direct peripheral-memory transfer

Fast & efficient!

DMA Controller ▼

The specialized hardware unit managing the DMA transfer process with three primary tasks:

  • 📍 Address Generation: Provides memory addresses for read/write operations
  • 🔢 Word Counting: Tracks the number of words transferred
  • 🚌 Bus Control: Manages system bus coordination between I/O device and memory

DMA Controller Components

Address Register
Word Count Register
Control Register
⬇️
Address Bus
Data Bus
Control Bus

DMA Transfer ▼

🔄 Cycle Stealing Technique

The DMA controller "steals" memory cycles from the CPU to perform I/O transfers. This allows data transfer to occur without halting CPU operations entirely.

DMA Transfer Process

CPU Requests I/O
→
DMA Takes Bus Control
→
Direct Transfer
→
CPU Notified
🔧
Input-Output Processor (IOP)

An even more autonomous mechanism: a dedicated processor designed specifically to handle I/O tasks, executing its own instruction set.

🆚 DMA vs IOP

DMA: Handles block data transfers set up by the CPU

IOP: Executes its own instructions, manages complex I/O programs independently

CPU-IOP Communication ▼

Critical coordination between the autonomous IOP and main CPU:

Communication Flow

  • 1️⃣ CPU Initialization: CPU sends command to IOP via control registers or shared memory
  • 2️⃣ IOP Execution: IOP executes I/O program independently, manages peripherals
  • 3️⃣ IOP Notification: IOP alerts CPU (via interrupt) when complete or on error
  • 4️⃣ Status Check: CPU reads status registers/memory to learn operation outcome
  • Real-World Examples ▼

    IBM 370 I/O Channel

    Classic mainframe I/O processor implementation

    Intel 8089 IOP

    Microprocessor-era I/O coprocessor design

    Serial Communication