retagged by
1,229 views
3 votes
3 votes
A hard disk is connected to a $2$ GHz processor through a DMA controller which works in burst mode. The initial set up of a DMA transfer takes $1000$ clock cycles for the processor and DMA completion requires $700$ clock cycles.

The hard disk has a transfer rate of $4000$ KB / sec and the average block size transferred is $16$ KB. Then, the fraction of CPU time free if the disk is transferring data is  _______%.
retagged by

2 Answers

Best answer
3 votes
3 votes

Total cycle required for initial set up of a DMA transfer and DMA completion

= (1000 + 700 ) clock cycles

=1700 clock cycles

Given clock rate= 2 GHz. So, clock cycle time=(1/clock rate)= (1/2 GHz) = (1/ 2*109 ) * 109 ns = 0.5 ns

No of cycles for Initialization and Completion of the block transfer is 1700 cycles,

so total time takes by processor =1700*0.5 ns=850 ns . let X = 850 ns , this is preparation time or total clock cycle time use by cpu .

Disk transfer rate is 4000 KB/sec. So, to transfer 16 KB, the time required is ( 16/4000 ) sec=4000000 ns.

Let  Y= 40,00000 ns , this is transfer time.

% of time processor "involved" is = X/(X+Y) * 100

= {850/(850+4000000)} * 100 [ as question explicitly says it is burst mode, so we use this formula x/x+y where x =clock cycle time use by cpu   and y = Transfer time ]
=0.02124 %

[ In burst mode all data is transferred in a single cycle . so we need to consider x+y in this formula x/x+y ]

Therefore, % of processor time is free= 100 - % of processor time involved
=(100- 0.02124) 

=99.97876 

=99.978

selected by
2 votes
2 votes
DMA initiation (taking the bus control) = $1000 cc = 500ns$

DMA completion (handling the bus control back) = $700 cc = 350 ns$

 

Time required for transferring a block of 16KB with 4000 KB/s speed = $16/4000=0.004seconds$

 

CPU time consumed would be just for setting up and handling the DMA = $500ns + 350ns = 850ns$

Total time would be = $850ns + 0.004s = 0.004s$ (approx)

 

So, CPU time consumed = $850ns/0.004s = 0.02\%$

=> %CPU time not consumed = $100-0.02=99.8\%$ (approx)
Answer:

Related questions

519
views
2 answers
0 votes
Bikram asked Nov 25, 2016
519 views
The fastest mode of data transfer is:Programmable I/OInterrupt I/ODMABoth A and B
405
views
3 answers
1 votes
Bikram asked Nov 25, 2016
405 views
Consider the following program segment for a CPU having three Registers $R1, R2,$ and $R3$:$$ \begin{array}{|l|l|l|} \hline \text{Instruction} & \text{Operation} & \text{...
308
views
1 answers
1 votes
Bikram asked Nov 25, 2016
308 views
Consider two pipelines A and B. Pipeline A has $8$ stages with uniform stage delay of $2$ns. Pipeline B has $5$ stages with uniform stage delays of $3$ns. Time saved (in ...
467
views
3 answers
1 votes
Bikram asked Nov 25, 2016
467 views
Consider a hypothetical processor that supports two addresses one address and zero address instructions. It has a $256$ word memory, and a $20$ bit instruction is place...