in CO and Architecture edited by
18,493 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

66 votes
66 votes
Best answer

Data count register gives the number of words the DMA can transfer in a single cycle..

Here it is $16$ bits.. so max $2^{16}$ words can be transferred in one cycle..

Since memory is byte addressable.. $1 \text{ word}=1\;\text{byte}$
                                                so $2^{16}$ bytes in $1$ cycle..
Now for the given file..
                               File size $=29154\ \textsf{KB} = 29154\times 2^{10}\ \textsf{B}$
                                                  $1$ cylce $\rightarrow$ DMA transfers $2^{16}\ \textsf{B}$
i.e 
                                             $1\ B$ transfered by DMA $\rightarrow \dfrac{1}{2^{16}}$ cycles.

Now, for full file of size $29154\ \textsf{KB},$

Minimum number of cylces $=\dfrac{(29154\times 2^{10}\ B)}{2^{16}}= 455.53$

But number of cylces is asked so $455.53\rightarrow 456.$

edited by

4 Comments

@ you are correct. $2^{16}-1$ is the highest unsigned value the register can represent and we can transfer that much amount (bytes) of data at max in one go..

2
2

@Deepak Poonia Sir is @cyril’s comment “ I have this doubt because am told that out of 2^16 sequences, the sequence of all 0’s is used to represent that there is no data to be transferred and hence its not included.”  True??

0
0

@abir_banerjee doubt resolved??

0
0
5 votes
5 votes

Size of data count register of the DMA controller = 16 bits

Data that can be transferred in one go = 216 bytes = 64 kilobytes File size to be transferred = 29154 kilobytes.

So, number of times the DMA controller needs to get the control of the system bus from the processor to transfer the file from the disk to main memory = ceil(29154/64) = 456  

edited by

2 Comments

c? There are no options:p. Correct answer btw:)
0
0
Correct answer is 456 only.
0
0
4 votes
4 votes
minimum 456

1 comment

An explanation would be helpful.
6
6
0 votes
0 votes

456 cycles

Answer:

Related questions