GATE Computer ScienceVery hardGATE CS (PYQ pattern)
A device streams 2 MB/s (1 MB = 10⁶ B) into memory on a 1.5 GHz CPU. With interrupt-driven I/O every 4-byte word costs 600 CPU cycles. With DMA, each block costs 1500 cycles of set-up plus a 1000-cycle completion interrupt, and the DMA's CPU load must not exceed 0.05%. Block sizes are powers of two bytes (1 KB = 1024 B). What is the smallest allowed block size, and about how many times lower is the CPU load then than with word-by-word interrupts?
- A. 8 KB; about 492 times
- B. 4 KB; about 246 times
- C. 16 KB; about 983 times
- D. 8 KB; about 123 times
Correct answer: A. 8 KB; about 492 times
DMA load = (2×10⁶ / B) × 2500 / 1.5×10⁹ ≤ 0.0005 → B ≥ 6667 bytes, so the smallest power of two is 8192 B. Then 244 blocks/s × 2500 = 6.1×10⁵ cycles/s, versus 5×10⁵ words/s × 600 = 3×10⁸ cycles/s for interrupts: ratio ≈ 492. Rounding down to 4 KB breaks the 0.05% limit; counting bytes as words gives 123.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A loop reads 128 words at addresses 0, 64, 128, …, 8128 and repeats this whole sweep three times. The cache is 4 KB, 2-way set-associative…
- A 64 MB byte-addressable memory with a 64-bit data bus (8 bytes per bus word) is built from 4M × 4 DRAM chips. How many chips are needed…
- Every memory reference first looks up a TLB (2 ns, hit ratio 96%). On a TLB miss the hardware walks a 3-level page table, each level…
- An x86-like addressing mode computes EA = base + index × scale + displacement, where the displacement is an 8-bit field that is…
- A 32-bit carry-select adder is built from blocks. A block of n bits contains two ripple adders (carry-in 0 and 1) that have their…
- A device produces a 40,000 bytes/s stream into a 16-byte buffer, and the CPU (500 MHz) polls it periodically, never letting the buffer…