- 2078 Kartik · 2+2 marks
DMA active and idle cycles
Short answer
Idle cycle: DMAC samples DREQ, CPU controls bus. Active cycle: DMAC requests bus via HOLD, gets HLDA, transfers byte/block, then releases bus. Disadvantages: extra hardware cost, complex programming, CPU halted during transfers, overhead for small moves, risk of memory corruption by bad addresses, cache coherence issues.
Describe the DMA active and idle cycles with appropriate figures. Provide at least five disadvantages of using DMA controllers.
In a DMA system the bus is used by either the CPU or the DMA controller (DMAC), so operation alternates between idle and active cycles.
- Idle cycle: the DMAC has no request (no DREQ) or has no bus. The CPU owns the bus and executes its program. The DMAC only samples DREQ lines.
- Active cycle: after DREQ, the DMAC sends HOLD, receives HLDA, and then controls the buses. It transfers one byte (cycle stealing), a block (burst) or until the CPU needs the bus. After the transfer, HOLD is released and the CPU resumes.
Time ->
CPU bus : |CPU CPU CPU| |CPU CPU CPU|
DMAC : |DMA DMA DMA|
HOLD : ____________|-----------|____________
HLDA : _____________|----------|____________
idle cycle active cycle idle cycle
The states of the 8237: SI (idle), S0 (wait for HLDA), S1-S4 (transfer), SW (wait).
Disadvantages of DMA controllers
- Extra hardware (DMA controller, bus arbitration logic) increases cost and complexity.
- Programming the controller (address, count, mode) is more complex.
- The CPU is stopped from using the bus during DMA (bus contention), so its throughput is reduced; in burst mode interrupts may be delayed.
- Not efficient for small or slow transfers because of set-up overhead.
- Memory and bus must be fast enough to support the DMA rate.
- Errors or an erroneous address/count can overwrite memory and are hard to debug.
- Cache coherence problems appear in systems with cache.
✓ Answer checked by Claude Sonnet 5.5
Related questions
- Case study: feasibility, drawbacks, convincing · Instrumentation II, chapter 10
- 8-channel ADC interface with 8255 and 8085 · Instrumentation II, chapter 4
- General process of creating a PCB · Instrumentation II, chapter 8
- Digital transmission system; analog vs digital · Instrumentation II, chapter 5
- Preliminary estimate: five-storey office, 2500 m² · Estimating and Costing, chapter 3
- Five GPSS block diagram symbols · Simulation and Modeling, chapter 9 · asked 2×