Skip to content
Official PYQ · 2001

GATE CS 2001 Q8 — I/O Scheduling

Explain with AI

Consider a disk with the following specifications: 20 surfaces, 1000 tracks/surface, 16 sectors/track, data density 1 KB/sector, rotation speed 3000 rpm. The operating system initiates the transfer between the disk and the memory sector-wise. Once the head has been placed on the right track, the disk reads a sector in a single scan. It reads bits from the sector while the head is passing over the sector. The read bits are formed into bytes in a serial-in-parallel-out buffer and each byte is then transferred to memory. The disk writing is exactly a complementary process.

For parts (C) and (D) below, assume memory read-write time = 0.1 microseconds/byte, interrupt driven transfer has an interrupt overhead = 0.4 microseconds, the DMA initialization, and termination overhead is negligible compared to the total sector transfer time. DMA requests are always granted.

  1. What is the total capacity of the desk?
  2. What is the data transfer rate?
  3. What is the percentage of time the CPU is required for this disk I/O for byte-wise interrupts driven transfer?
  4. What is the maximum percentage of time the CPU is held up for this disk I/O for cycle-stealing DMA transfer?
View worked solution

Answer: 800

This is a multi-part question. The given key 800 corresponds to the Data Transfer Rate (in KB/s) asked in Part (B). Below is the step-by-step solution for all parts:

Part (A): Total Capacity of the Disk
Capacity=20 surfaces×1000 tracks/surface×16 sectors/track×1 KB/sector=320,000 KB=320 MB\text{Capacity} = 20 \text{ surfaces} \times 1000 \text{ tracks/surface} \times 16 \text{ sectors/track} \times 1 \text{ KB/sector} = 320,000 \text{ KB} = 320 \text{ MB}

Part (B): Data Transfer Rate

  • Rotation speed = 3000 rpm=300060=50 rotations/second3000 \text{ rpm} = \frac{3000}{60} = 50 \text{ rotations/second}.
  • Data read per rotation (1 track) = 16 sectors×1 KB/sector=16 KB16 \text{ sectors} \times 1 \text{ KB/sector} = 16 \text{ KB}.
  • Data Transfer Rate=50 rotations/sec×16 KB/rotation=800 KB/s\text{Data Transfer Rate} = 50 \text{ rotations/sec} \times 16 \text{ KB/rotation} = \mathbf{800} \text{ KB/s}.

Part (C): CPU Percentage for Interrupt-Driven Transfer

  • Time to read 1 sector = 1 rotation16 sectors=20 ms16=1.25 ms=1250μs\frac{1 \text{ rotation}}{16 \text{ sectors}} = \frac{20 \text{ ms}}{16} = 1.25 \text{ ms} = 1250 \mu\text{s}.
  • Assuming 1 KB=1000 bytes1 \text{ KB} = 1000 \text{ bytes} for transfer calculations, time per byte = 1250μs1000=1.25μs\frac{1250 \mu\text{s}}{1000} = 1.25 \mu\text{s}.
  • CPU time per byte = Interrupt overhead+Memory R/W time=0.4μs+0.1μs=0.5μs\text{Interrupt overhead} + \text{Memory R/W time} = 0.4 \mu\text{s} + 0.1 \mu\text{s} = 0.5 \mu\text{s}.
  • CPU percentage=0.5μs1.25μs×100%=40%\text{CPU percentage} = \frac{0.5 \mu\text{s}}{1.25 \mu\text{s}} \times 100\% = 40\%.

Part (D): CPU Hold-up Percentage for Cycle-Stealing DMA

  • DMA steals 1 memory cycle (0.1μs0.1 \mu\text{s}) per byte transfer.
  • CPU hold-up percentage=Memory R/W timeTime per byte×100%=0.1μs1.25μs×100%=8%\text{CPU hold-up percentage} = \frac{\text{Memory R/W time}}{\text{Time per byte}} \times 100\% = \frac{0.1 \mu\text{s}}{1.25 \mu\text{s}} \times 100\% = 8\%.

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

Published
Report a correction
Keep exploringMore I/O Scheduling questions