- Asked 3/20
- 2074 Asoj · 6 marks
- 2076 Chaitra · 5 marks
- 2068 Baisakh (old course) · 8 marks
Data transfer techniques for slow I/O
Short answer
When I/O speed mismatches, use: status check (polling with handshake, CPU wastes time), interrupt-driven transfer (device signals readiness via INTR, CPU performs ISR to transfer byte, allowing concurrency), or direct memory access (DMA controller takes bus control from CPU, transfers block directly between device and memory). DMA offers highest speed with lowest CPU load.
If the speeds of I/O devices do not match the speed of the microprocessor, what types of data transfer techniques are used? Describe them with necessary block diagrams and control signals.
When the I/O device is much slower than the microprocessor (or has an unpredictable timing), the processor must synchronise with it. The techniques are: (1) status check (polling) with handshake, (2) interrupt driven transfer, and (3) DMA.
1. Handshake / status check (programmed I/O)
The processor reads a status flag of the device repeatedly until it is ready, then transfers data. Control signals (for an input device with an 8255 in mode 1): STB' (strobe from device: data is valid), IBF (input buffer full: tells the device data is latched), and for output OBF' and ACK'.
Device Port (8255) CPU
| --- data ---------> | |
| --- STB' --------> | IBF = 1 ------------>| polls status
| <-- IBF --------- | | IN data
| | IBF = 0 (after RD') |
Simple, but the CPU wastes time in the polling loop.
2. Interrupt driven transfer
The device raises an interrupt request (INTR/IRQ) when it is ready. The CPU completes the current instruction, saves the return address, and jumps to the service routine (via INTA' and vector), which transfers the byte and returns. The CPU does other work meanwhile.
Device --INTR--> [Interrupt controller] --INT--> CPU
CPU --INTA'--> controller (vector) CPU <-> Data bus <-> Device
Signals: INTR/INT, INTA', RD', WR', IR0-IR7.
3. DMA (direct memory access)
For fast or block transfers, a DMA controller (8237) takes over the bus. The device sends DREQ, the controller sends HOLD to the CPU, the CPU answers HLDA and floats its buses, the controller issues DACK to the device, and generates address, MEMR'/IOW' (or MEMW'/IOR') for each byte until the count is over.
Device --DREQ--> DMAC --HOLD--> CPU
Device <--DACK-- DMAC <--HLDA-- CPU
DMAC drives address bus, MEMR', MEMW', IOR', IOW'
Data goes Device <-> Memory directly
| Technique | CPU load | Speed | Hardware |
|---|---|---|---|
| Polling | Very high | Low | Very simple |
| Interrupt | Medium | Medium | Interrupt controller |
| DMA | Very low | Highest | DMA controller |
✓ Answer checked by Claude Sonnet 5.5
Related questions
- Double handshake data transfer with 8255-PPI · Instrumentation II, chapter 2
- Parallel transfer schemes and 8255A block diagram · Instrumentation II, chapter 2
- Basic data transfer mechanisms in USB · Instrumentation II, chapter 3
- Data logger block diagram and operation · Instrumentation II, chapter 5 · asked 6×
- Rationale for microprocessor; open-loop MBI; DMA · Instrumentation II, chapter 1
- Compact data logger characteristics and block diagram · Instrumentation II, chapter 5
- Data logger and remote control block diagrams · Basic Electronics Engineering, chapter 7
- Space diversity techniques with block diagrams · Wireless Communication, chapter 5
- Speed control techniques in AC drives · Utilization of Electrical Energy, chapter 3
- Time and space mean speed from 20 spot speeds · Transportation Engineering II, chapter 1