recategorized by
26,836 views
52 votes
52 votes

A hard disk with a transfer rate of $10$ Mbytes/second is constantly transferring data to memory using DMA. The processor runs at $600$ MHz, and takes $300$ and $900$ clock cycles to initiate and complete DMA transfer respectively. If the size of the transfer is $20$ Kbytes, what is the percentage of processor time consumed for the transfer operation?

  1. $5.0 \%$
  2. $1.0\%$
  3. $0.5\%$
  4. $0.1\%$
recategorized by

10 Answers

Best answer
90 votes
90 votes
Clock cycle time = $\frac{1}{600 \times 10^6}$   [ Frequency = 1/Time]

 For DMA initiation and completion = $\frac{(900+300)}{600\times10^6}  = 2$ microsec .

 Disk Transfer rate $= 10$ Mbytes/sec

 $1$ byte $= \frac{1}{10^7}$ sec

 $20$ Kbytes $= 2$ milisec $= 2000$ micro sec

  Percentage $= \left (\frac{2}{2+2000} \right )\times100    =0.0999 ≃ 0.1\%$

 option (D)

 
$\%$ of CPU time consumed $=\frac{x}{x+y}$

If $x$ is the Data preparation time or Total cycle time used by CPU and $y$ is the Data transfer time, to calculate the fraction of CPU time to the data transfer time -  we use $\frac{x}{x+y}$ in burst mode.
edited by
15 votes
15 votes

Clock cycle time = (1/600) x 10 ^6

 For DMA initiation and competion = (900+300)/(600 x 10 ^6) = 2 microsec .

Disk Transfer rate = 10 M bytes. 1 byte = 1/10^7 sec

20 K bytes = 2000 microsec Percentage = (2/2000)*100 =0.1%

so, ans D

.

8 votes
8 votes
It is simple logical question. No need of so many calculations.
The answer is simply
 (20KB/10MB)x100
= (20KB/10x1024KB)x100
= 0.1%

The reason for this is whatever may be the processor speed and clock cycle . While taking percentage ratio they will get cancel led out.
8 votes
8 votes

Processor Speed = 600MHZ = $6*10^{8}$ cycles/second

Transfer time =   $\frac{20KB}{10MB}$ = 2ms = $12*10^{5}$ cycles

Total cycles consumed = 1200,000 + 300 + 900 = 120,1200 cycles
% of processor time consumed =  $\frac{120,1200*100}{6*10^{8}} =  \frac{12012}{60000}$= 0.2%

So, (D) can be chosen as option!

edited
Answer:

Related questions

59 votes
59 votes
4 answers
1
go_editor asked Apr 24, 2016
19,516 views
Consider the following program segment for a hypothetical CPU having three user registers $R_1, R_2$ and $R_3.$\begin{array}{|l|l|c|} \hline \text {Instruction} & \text...
35 votes
35 votes
3 answers
2
17 votes
17 votes
3 answers
4