Skip to content
Official PYQ · 1996

GATE CS 1996 Q25 — I/O Interface: Interrupt and DMA Mode

Explain with AI
A hard disk is connected to a 5050 MHz processor through a DMA controller.  Assume that the initial set-up of a DMA transfer takes 10001000 clock cycles for the processor, and assume that the handling of the interrupt at DMA completion requires 500500 clock cycles for the processor. The hard disk has a transfer rate of 20002000 Kbytes/sec and average block transferred is 44 K bytes.  What fraction of the processor time is consumed by the disk, if the disk is actively transferring 100%100\% of the time?
View worked solution

Answer: 1.4 : 1.5

To find the fraction of processor time consumed by the disk, we calculate the processor overhead incurred by the DMA transfers per second.

Step 1: Calculate the processor overhead per DMA transfer
Total overhead per transfer=Setup time+Interrupt handling time\text{Total overhead per transfer} = \text{Setup time} + \text{Interrupt handling time} Total overhead per transfer=1000+500=1500 clock cycles\text{Total overhead per transfer} = 1000 + 500 = 1500 \text{ clock cycles}

Step 2: Calculate the number of transfers per second
Depending on how the unit "K" is interpreted, we have two standard cases:

  • Case 1 (Decimal interpretation, 1 KB=1000 bytes1\text{ KB} = 1000\text{ bytes}):
    Transfers per second=2000×103 bytes/sec4×103 bytes=500 transfers/sec\text{Transfers per second} = \frac{2000 \times 10^3 \text{ bytes/sec}}{4 \times 10^3 \text{ bytes}} = 500 \text{ transfers/sec}
  • Case 2 (Binary interpretation for block size, 1 KB=1024 bytes1\text{ KB} = 1024\text{ bytes}):
    Transfers per second=2000×103 bytes/sec4×1024 bytes≈488.28 transfers/sec\text{Transfers per second} = \frac{2000 \times 10^3 \text{ bytes/sec}}{4 \times 1024 \text{ bytes}} \approx 488.28 \text{ transfers/sec}

Step 3: Calculate the fraction of processor time consumed
Total processor clock cycles per second=50 MHz=50×106 cycles/sec\text{Total processor clock cycles per second} = 50 \text{ MHz} = 50 \times 10^6 \text{ cycles/sec}

  • For Case 1:
    Processor cycles used per second=500×1500=7.5×105 cycles/sec\text{Processor cycles used per second} = 500 \times 1500 = 7.5 \times 10^5 \text{ cycles/sec} Fraction consumed=7.5×10550×106=0.015 (or 1.5%)\text{Fraction consumed} = \frac{7.5 \times 10^5}{50 \times 10^6} = 0.015 \text{ (or } 1.5\%\text{)}
  • For Case 2:
    Processor cycles used per second=488.28×1500≈732,422 cycles/sec\text{Processor cycles used per second} = 488.28 \times 1500 \approx 732,422 \text{ cycles/sec} Fraction consumed=732,42250×106≈0.0146 (or 1.46%)\text{Fraction consumed} = \frac{732,422}{50 \times 10^6} \approx 0.0146 \text{ (or } 1.46\%\text{)}

Thus, the fraction of processor time consumed is in the range of 1.4%1.4\% to 1.5%1.5\% (or 0.0140.014 to 0.0150.015).

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore I/O Interface: Interrupt and DMA Mode questions