Sub topic 9
DMA Transfer Modes: Burst, Cycle Stealing, and Transparent DMA
Assume you know CPU registers, memory, buses, instruction cycles, and the basic operation of a DMA controller. This chapter focuses on how a DMA controller shares the system bus with the CPU after a device requests a block transfer.
Why DMA needs transfer modes
Direct memory access (DMA) moves data between an I/O device and main memory with little CPU involvement. The DMA controller temporarily becomes the bus master. It places addresses on the bus, controls read and write signals, and updates its address and count registers.
The CPU and DMA controller cannot freely use the bus at the same time. A transfer mode defines when DMA may use the bus and how much it delays the CPU.
The three common modes are:
| Mode | DMA bus use | Effect on CPU | Typical use |
|---|---|---|---|
| Burst mode | DMA keeps the bus for a complete block | CPU waits during the block | High-speed block transfer |
| Cycle stealing | DMA takes one bus cycle at a time | CPU slows down but continues | Balanced CPU and I/O activity |
| Transparent DMA | DMA uses only otherwise idle bus cycles | CPU is almost unaffected | Low-priority transfers |
The names describe bus ownership, not the physical speed of the memory or device.
Burst mode
In burst mode, also called block mode, the DMA controller requests the bus and transfers many consecutive words before releasing it.
A typical sequence is:
- The device raises a DMA request.
- The DMA controller asks the CPU for control of the bus.
- The CPU finishes its current bus operation and grants the bus.
- The DMA controller transfers the entire block.
- The DMA controller releases the bus.
- The CPU resumes normal bus activity.
The address register usually increments after each transfer. The word-count register decreases after each transfer. When the count reaches zero, the DMA controller ends the burst.
Burst mode gives high throughput because the controller does not repeat bus-request and bus-grant handshakes for every word. However, the CPU may be unable to fetch instructions or access data for the whole burst. A long burst can therefore increase CPU response time.
Cycle stealing
In cycle-stealing mode, the DMA controller transfers one word, or sometimes a small fixed group of words, during each bus takeover. It then returns control to the CPU.
For one stolen cycle, the sequence is:
- DMA requests the bus.
- The CPU grants the bus.
- DMA performs one memory or I/O transfer.
- DMA releases the bus.
- The CPU continues.
The CPU loses individual bus cycles rather than an entire block. It can continue executing between DMA transfers, but its execution becomes slower. If the CPU needs the bus frequently, cycle stealing can create noticeable delays.
Cycle stealing is useful when the device needs a steady data rate but the CPU must remain responsive. It usually has more arbitration overhead than burst mode because bus ownership changes repeatedly.
Transparent DMA
Transparent DMA attempts to use the bus only when the CPU is not using it. The DMA controller monitors bus activity and performs transfers during idle bus periods.
The CPU does not normally have to stop or surrender an active bus cycle. This minimizes interference with CPU execution. The trade-off is lower and less predictable DMA throughput. If the CPU keeps the bus busy, the DMA controller may wait for a long time.
Transparent DMA is therefore appropriate for low-priority transfers. It is usually unsuitable when a device has a strict, high-rate deadline unless the system provides enough idle bus capacity.
Choosing a mode
The choice depends on throughput, CPU delay, and timing requirements.
- Choose burst mode when completing the block quickly matters more than CPU response during the transfer.
- Choose cycle stealing when the CPU and device must share the bus continuously.
- Choose transparent DMA when CPU interference must be minimized and the device can tolerate waiting.
A common mistake is to assume that burst mode always uses more total CPU time. DMA usually reduces CPU work for the whole transfer. Burst mode mainly changes when bus interference occurs: it creates a long delay instead of many short delays.
Another mistake is to confuse bus cycles with CPU instructions. One CPU instruction may require several bus cycles, and one DMA word transfer may require separate memory and I/O bus operations. Always use the cycle definition given in the problem.
GATE-style comparison
Suppose a DMA controller transfers 1,024 words.
- In burst mode, the CPU may wait for all 1,024 transfers.
- In cycle-stealing mode, the CPU loses approximately 1,024 bus cycles, distributed across the transfer.
- In transparent mode, the transfer duration depends on how often the bus becomes idle.
If each transfer takes one bus cycle, the DMA bus occupancy is approximately 1,024 cycles in all three cases. The difference is the timing of those cycles and the resulting CPU delay.
Exercise
Which DMA mode is best when a high-speed device must transfer a block quickly, even if the CPU must wait temporarily?
Show answer
Burst mode, because DMA retains the bus and transfers the block with little arbitration overhead.
Exercise
Why can transparent DMA take longer than burst DMA for the same number of words?
Show answer
Transparent DMA waits for CPU idle bus cycles, so a busy CPU can leave fewer opportunities for DMA transfers.