retagged by
1,280 views
0 votes
0 votes

The below question is from Made Easy Test series

The diagram shows single bus detached DMA configuration for a system. How many times system bus is used for single data transfer using DMA(Consider only data transfer, not command or status transfer) 

 

  1. 1
  2. 2
  3. 3
  4. 0

Here answer according to their solution is option B.

Reason: One access of system bus for data transfer from i/o to DMA and other for data transfer from DMA to memory.

 

My Doubt: In DMA their is direct data transfer from i/o to memory so system bus is accessed only once.

Is this correct?

 

retagged by

1 Answer

1 votes
1 votes

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.

edited by

Related questions

1 votes
1 votes
2 answers
3
sidsunny asked Jan 26, 2017
827 views
I have gone through these types of questions but I'm unable to understand. how to appraoch these questions? And during the dma transfer, cpu is considered to be idle. bef...