The DMA mechanism can be configured in a variety of ways, which are:
- Single-bus detached DMA.
- Single-bus integrated DMA-I/O
- I/O bus
In Question – Single bus detached DMA is mentioned and in this two “system bus” cycles are needed.
@Chaitanya Kale, When the data is about to be transferred, the DMA controller gets access to the system bus from the CPU.
But if we consider this then bus is busy for data preparation as well as data transfer but this shouldn't happen as bus should be busy only during data transfer time.
When the device has a lot of data to be transferred, we will surely need some buffer to store the access amount, so the natural question will be how will that data reach the buffer. it has to be through the bus, right?
1st ref. → DMA configuration
2nd ref. → One- And Two-Step DMA Transfers (Page no. 2)
3rd ref. → Computer Organization and Architecture Designing for Performance, William Stallings, 10th ed, Chap-7, Page no. 250-251.
Directly Quoting from Stallings below:
“The DMA mechanism can be configured in a variety of ways. Some possibilities are shown in Figure 7.14. In the first example, all modules share the same system bus.
The DMA module, acting as a surrogate processor, uses programmed I/O to exchange data between memory and an I/O module through the DMA module. This configuration, while it may be inexpensive, is clearly inefficient. As with processor-
controlled programmed I/O, each transfer of a word consumes two bus cycles.”
Another ref. → Configurations of DMA
Whereas in “single-bus, integrated DMA-I/O, and I/O bus”, only 1 system bus cycle is needed. Below is another quote from William Stallings which confirms the same.
In both of these cases (Figures 7.14b and c), the system bus that the DMA module shares with the processor and memory is used by the DMA module only to exchange data with memory. The exchange of data between the DMA and I/O modules takes place off the system bus.
So the answer is Option B.