What are the ways to transfer data under DMA control? Also, explain…

2025

What are the ways to transfer data under DMA control? Also, explain cycle-stealing mode.

Show answer & explanation

CONCEPT

Direct Memory Access (DMA) lets a DMA controller move data directly between an I/O device and main memory after the CPU initializes the transfer address, direction, and count.

Because the CPU and DMA controller share the system bus, DMA transfer modes differ in how long and when the controller owns that bus.

APPLICATION

The main ways to transfer data under DMA control are:

  • Burst or block mode: the DMA controller takes control of the bus and retains it while an entire block is transferred. The CPU cannot use the bus during that burst.

  • Cycle-stealing or single-transfer mode: the DMA controller takes the bus for one byte or word transfer, then releases it so the CPU can resume bus use.

  • Transparent or hidden mode: the DMA controller uses the bus only during cycles in which the CPU is not using it, so CPU execution is disturbed least, although the overall DMA transfer may take longer.

CYCLE-STEALING SEQUENCE

  1. The CPU first programs the DMA controller with the starting memory address, transfer direction, and number of bytes or words.

  2. When the device is ready, the DMA controller requests control of the system bus.

  3. After the CPU grants the bus, the DMA controller transfers exactly one byte or word directly between the device and memory.

  4. The controller updates its address and count registers and releases the bus. The CPU then regains the bus until the next DMA request.

  5. This request-grant-transfer-release sequence repeats until the count reaches zero; the DMA controller then interrupts the CPU to signal completion.

CROSS-CHECK / CONTRAST

Cycle stealing interleaves CPU and DMA bus use and therefore slows the CPU briefly for each stolen cycle. In contrast, burst mode blocks CPU bus access for a whole block, while transparent mode waits for CPU-idle bus cycles.

RESULT

Thus, cycle stealing trades some DMA throughput for shorter CPU stalls and fairer sharing of the system bus.

Explore the full course: Up Lt Grade Assistant Teacher 2025

Loading lesson…