IAE Academy

I/O, interrupts & DMA formulas

I/O interface: interrupts and DMA. 6 formulas for GATE CS Computer Organization and Architecture, each with when to use it. Each is explained in the topic notes.

All 6 I/O, interrupts & DMA formulas

TOTAL INTERRUPT-SERVICING OVERHEAD FOR N INTERRUPTS

= number of interrupts serviced in the period analysed; = context-save time; = the ISR's own execution time, excluding save and restore; = context-restore time. Divide by the total elapsed time to get the fraction of CPU time spent.

FRACTION OF CPU TIME SPENT ON ONE DEVICE'S INTERRUPTS

= total CPU time per interrupt (save + service + restore); = average time between interrupts; = interrupts per second. If there is one interrupt per word, is the device's word rate. This holds only while . Otherwise the CPU cannot keep up and data is lost.

BURST (BLOCK) MODE DMA TRANSFER TIME

= number of words in the block; = one memory (bus) cycle time. This holds when:

  • each word needs exactly one memory cycle;
  • the words are available back to back (for example from the device's buffer);
  • the DMAC holds the bus for the whole block;
  • bus request/grant overhead is ignored.

During this time the CPU cannot use the bus. It can still carry on with internal operations that need no bus.

CPU TIME LOST TO CYCLE-STEALING DMA OVER N WORDS

One bus cycle is stolen per word, assuming each word needs exactly one memory access. The two sides are equal in the standard model, where the CPU would have used the bus in every stolen cycle and arbitration overhead is ignored. This is the same product as burst mode, but it means something different. In cycle stealing, the loss is spread as separate one-cycle delays, and the total elapsed time is set by the device's word rate. In burst mode, the CPU is locked out for one continuous stretch.

FRACTION OF BUS CYCLES TAKEN BY CYCLE-STEALING DMA

= time of the one bus cycle stolen per word; = time between successive word transfers, i.e. the device's word period. This assumes the CPU would otherwise use the bus in every cycle, and .

Some questions give a time to prepare a word and a time to transfer it (). If the device cannot prepare the next word during the transfer, . If preparation overlaps the transfer, (assuming ). State which reading you use.

PERCENTAGE OF CPU TIME USED ON DMA SET-UP AND COMPLETION

= CPU time to program the DMAC for one block; = CPU time for the completion interrupt. This assumes the device transfers continuously, one block after another, and ignores the bus cycles DMA steals. Add the stolen-cycle fraction separately if the question asks for it.

Where this was asked: 2018 (1), 2020 (1), 2022 (1), 2023 (1), 2024 (2), 2025 (1), 2026 (1). See the 8 previous-year questions on I/O, interrupts & DMA. This shows what was asked, not what will be asked.