GATE / CS ARCHIVE

GATE CSE 2001 / QUESTION 8(d)

Cycle-stealing DMA occupation

Computer Organization & Architecture · Input/Output, DMA & Interrupts · Full GATE CSE 2001 paper

GATE 2001, Q8(d) Descriptive
Report issue

Input/Output, DMA & Interrupts

Question 8(d), GATE 2001: Disk: 20 surfaces, 1000 tracks/surface, 16 sectors/track, 1 KB/sector, 3000 rpm; transfer one byte at a time. For CPU calculations memory transfer costs 0.1 μs/byte, interrupt overhead 0.4 μs/byte, DMA setup negligible and requests always granted. Use 1 KB=1024 bytes.

Task: Find the maximum percentage of CPU time held up by cycle-stealing DMA.
Question 8(d), GATE 2001: Disk: 20 surfaces, 1000 tracks/surface, 16 sectors/track, 1 KB/sector, 3000 rpm; transfer one byte at a time. For CPU calculations memory transfer costs 0.1 μs/byte, interrupt overhead 0.4 μs/byte, DMA setup negligible and requests always granted. Use 1 KB=1024 bytes.

Task: Find the maximum percentage of CPU time held up by cycle-stealing DMA.
Tap to enlarge
Shared context

Disk: 20 surfaces, 1000 tracks/surface, 16 sectors/track, 1 KB/sector, 3000 rpm; transfer one byte at a time. For CPU calculations memory transfer costs 0.1 μs/byte, interrupt overhead 0.4 μs/byte, DMA setup negligible and requests always granted. Use 1 KB=1024 bytes.

Answer & solution

Answer: Maximum CPU hold-up is 8.192% during sustained transfer. (no official key was published)

1. Cycle-stealing DMA transfers each byte directly between the device and memory. It does not invoke the CPU once per byte, so the 0.4 μs interrupt overhead does not apply.

2. The memory bus is taken for the specified 0.1 μs per byte. At 819,200 bytes/s, DMA occupies memory for 819,200×0.1 μs=81,920 μs per second.

3. If every stolen cycle would otherwise have been useful to the CPU, the CPU is held up for the full 0.08192 seconds per second: 8.192%. This is the requested maximum.

4. Actual processor slowdown can be lower if some stolen bus cycles overlap times when the CPU needs no memory service. Initialization and termination costs are excluded because the question explicitly makes them negligible.

Original paper, page 8