A hard disk is connected to a 50 MHz processor through a DMA controller.…

1996

A hard disk is connected to a 50 MHz processor through a DMA controller. Assume that the initial set-up of a DMA transfer takes 1000 clock cycles for the processor, and assume that the handling of the interrupt at DMA completion requires 500 clock cycles for the processor. The hard disk has a transfer rate of 2000 Kbytes/sec and average block transferred is 4 K bytes. What fraction of the processor time is consumed by the disk, if the disk is actively transferring 100% of the time?             

  1. A.

    1.5%

  2. B.

    1%

  3. C.

    2.5%

  4. D.

    10%

Attempted by 5 students.

Show answer & explanation

Correct answer: A


2000 KB is transferred in 1 second

 4 KBtransfer is (4/2000)∗1000 ms = 2 ms

Total cycle required for locking and handling of interrupts after DMA transfer control

=(1000+500) clock cycle =1500 clock cycle 

Now, 50 Mhz=50∗106=0.02 microsecond


So, (1500∗0.02)=30 microsecond

30μs for initialization and termination and  2ms for data transfer.

The CPU time is consumed only for initialization and termination.

Fraction of CPU time consumed =30μs/(30μs+2ms)=0.015

Explore the full course: Gate Guidance By Sanchit Sir