Input Output Organisation Mistakes: 7 GATE Traps and Fixes

Knowing the I/O definitions is not enough. Repair seven common classification, unit, latency, addressing and interrupt mistakes through compact worked examples.

KnowledgeGate Team

Exam prep & CS education

Updated 28 Nov 20264 min read
Input Output Organisation Mistakes: 7 GATE Traps and Fixes

You may know the definitions of programmed I/O, interrupt-driven I/O and DMA, yet lose the mark by counting the wrong event. A byte becomes a word, a bus transfer becomes CPU work, or one latency term disappears. The Input Output Organisation in COA: I/O Modes and DMA Example explains the complete interface and transfer-mode model. The recurring errors are event counts, CPU cost, bus stalls, disk terms, address-space accounting, interrupt nesting and units.

1. Mistake: choosing an I/O mode from a keyword

Seeing "fast device" does not automatically mean DMA, just as seeing "interrupt" does not mean one interrupt per byte. First ask who moves each data unit, who owns the bus during that movement, and what event notifies the CPU.

Suppose a device moves a 64 KiB = 65,536 byte block. With a stated 4-byte programmed-I/O action, the CPU performs 65,536 / 4 = 16,384 transfer actions. If interrupt-driven I/O batches 4 KiB per interrupt, the count is 65,536 / 4,096 = 16 interrupts. If DMA handles the whole block, the CPU performs one setup and receives one completion interrupt, while the controller transfers the data.

Write the transfer granularity beside every mode before using a rate. Revisit the wider subject in the GATE CS Computer Architecture Course.

2. Mistake: mixing device rate, event rate and CPU time

Keep the unit on every line. For a 2 GHz CPU doing 5,000 polling checks per second at 400 cycles each:

5,000 events/s x 400 cycles/event = 2,000,000 cycles/s

CPU time is 2,000,000 / 2,000,000,000 = 0.001 s in each second, or 0.1%.

At 5,000 interrupts per second and 3,000 cycles per interrupt, overhead is 15,000,000 cycles/s. That is 15,000,000 / 2,000,000,000 = 0.0075 s per second, or 0.75%. Neither method is automatically cheaper. Event frequency and cost decide it. Divide by the CPU rate once, then multiply by 100 only for the percentage.

3. Mistake: charging DMA transfers to the CPU

DMA accounting lanes separate CPU overhead, bus stalls, and total CPU-unavailable time.

DMA data movement is not CPU-executed overhead, but cycle stealing can still make the CPU wait. Keep executed cycles and stall cycles separate.

A DMA controller moves 4 KiB over a 4-byte-wide bus, requiring 4,096 / 4 = 1,024 bus transfers. Setup costs 800 CPU-clock cycles and the completion ISR costs 400, so CPU-executed overhead is 800 + 400 = 1,200 cycles. If every transfer steals one CPU-clock cycle, stall time is 1,024 cycles. Total CPU-unavailable time is 1,200 + 1,024 = 2,224 cycles. If only instruction overhead is requested, answer 1,200 cycles.

Three aligned lanes show CPU setup and completion work, DMA transfers for a 4 KiB block, memory-bus stalls, and the three cycle totals.

4. Mistake: dropping a disk-access term

For average disk access, use seek + average rotation + transfer. Do not replace average rotational latency with a full rotation. The Disk Access Time: Seek, Latency and Transfer covers the broader best, average and worst rotational model; the missing-term trap still requires all three terms in one GATE numerical.

Consider a hypothetical 7,200 rpm disk with 5 ms average seek and a 32 KiB transfer at 100 MiB/s. One rotation takes (60 / 7,200) s = 8.3333 ms, so average rotational latency is 8.3333 / 2 = 4.1667 ms. Transfer time is 32 KiB / 100 MiB/s = 0.3125 ms. Total average access is 5 + 4.1667 + 0.3125 = 9.4792 ms.

Using a full rotation gives the wrong 13.6458 ms. Omitting seek gives the wrong 4.4792 ms. Convert every term to milliseconds before adding.

5. Mistake: subtracting devices instead of addresses

A 16-bit byte-addressed space has 65,536 address codes, from 0x0000 to 0xFFFF. Suppose four devices occupy eight consecutive byte addresses each: 0xFF00-0xFF07, 0xFF08-0xFF0F, 0xFF10-0xFF17 and 0xFF18-0xFF1F.

Memory-mapped I/O reserves 4 x 8 = 32 codes, leaving 65,536 - 32 = 65,504 general memory address codes. With isolated I/O and a separate I/O address space, those 32 codes do not reduce memory space.

Write devices x addresses per device, then subtract only for a shared address space. For broader related addressing practice, use Zero to Hero Complete CS Course.

6. Mistake: treating priority as automatic pre-emption

Priority alone does not guarantee that one ISR interrupts another. The earlier Interrupt-Driven I/O: CPU Handshake and GATE Traps covers the request, ISR and handshake timing; nesting still determines whether priority permits pre-emption.

ISR A starts at t = 0 microseconds and needs 6 microseconds. Higher-priority B arrives at t = 2 microseconds and needs 1 microsecond. With nesting, A runs from 0 to 2, B from 2 to 3, then A from 3 to 7. Without nesting, A runs from 0 to 6 and B from 6 to 7. Both finish by 7, but B completes at 3 in the first case and 7 in the second. Add no context-switch overhead when none is given.

7. Mistake: skipping the magnitude and scope check

Return to the 64 KiB block. At 32 MiB/s, raw transfer time is 64 KiB / 32 MiB/s = 1/512 s = 1.953125 ms. Because both rates use binary units, they cancel cleanly. An answer in whole seconds, nanoseconds or 16,384 milliseconds signals a unit or event-count error.

Use a 20-second audit: circle what is requested, separate CPU work from bus work, check average versus worst case, verify bytes versus words, and estimate the order of magnitude. Then practise these habits on mixed Input Output Organisation questions.

The short version

Classify the I/O mode, retain units on every line, and count only the resource the question asks about. If you need a connected multi-subject route, continue with the GATE CS Computer Architecture Course linked above and apply the same audit to every numerical.