in CO and Architecture edited by
18,501 views
43 votes
43 votes
The size of the data count register of a $\text{DMA}$ controller is $16\;\text{bits}$. The processor needs to transfer a file of $29,154$ kilobytes from disk to main memory. The memory is byte addressable. The minimum number of times the $\text{DMA}$ controller needs to get the control of the system bus from the processor to transfer the file from the disk to main memory is _________.
in CO and Architecture edited by
18.5k views

4 Comments

Data count register = $16$ bits.

=> Data that can be transferred at once = $2^{16}$ bytes. (Because byte addressable memory)

Total data to be transferred = $29154*1024$ bytes.

 

Number of transfers required = $29154*1024 \div 65536=455.531$

So, 456 attempts required.

2
2
The mode(cycle stealing/burst) is not given explicitly. However, from what I have observed, devices which are relatively fast(like disk) are usually operated in burst mode while those that are relatively slow(like printer) are usually operated in cycle stealing mode.
2
2
But still it is not compulsory.

It can work in cycle stealing mode we get ans : 0.

It can also work in transparent mode we can get ans : 1.

So all these answer should be correct right, since they haven’t written minimum or maximum?
0
0
how much data DMA can transfer in one cycle??

I never heard of data count register. Can anybody share some reference?
0
0

6 Answers

0 votes
0 votes
Since nothing is mentioned about the mode of DMA working whether it is cycle stealing mode or burst mode, we consider it as burst mode by default.
As the data count register of the DMA is 16 bits long in burst mode DMA transfers 216 Bytes (= 64KB) once it gets the control.
To transfer 29,154 KB, no. of times DMA needs to take control
= (29,154 KB / 64KB)
= 29,154/64
= 455.53, means 456 times.

2 Comments

it is 2^16 means at a time can identify 64KB of data.
0
0
Why burst mode is default?

We can do with cycle stealing(1) mode or transparent mode (0).
0
0
0 votes
0 votes
  1. Convert file size to bytes:

    • 29,154 kilobytes * 1024 bytes/kilobyte = 29,805,568 bytes
  2. Calculate maximum transfer size per DMA request:

    • 2^16 - 1 = 65,535 bytes (16-bit data count register)
  3. Divide total file size by maximum transfer size:

    • 29,805,568 bytes / 65,535 bytes/request = 455.99 requests
  4. Round up to the nearest whole request:

    • 455.99 requests ≈ 456 requests
Answer:

Related questions