ITPEC FE Morning April 2023 Question 17

A printer prints 400 characters per second. The printer uses interrupt-driven I/O and each character printed requires an interrupt that takes 50 microseconds. What percentage of the printer's CPU is available to do other work during printing? Here, other overhead time for the CPU can be ignored.

Explanation

98 — the interrupts take 2% of every second, leaving 98% of the CPU for other work.

  • •Interrupts per second: 400, one per character
  • •CPU time spent on them each second: 400 × 50 = 20,000 µs
  • •Share of one second (1,000,000 µs): 20,000 ÷ 1,000,000 = 0.02, that is 2%
  • •Available: 100 − 2 = 98 %

Answer (a)

Why not others:

  • •(b) 96 — would mean 4% busy, twice the real 20,000 µs of interrupt handling per second
  • •(c) 4 — a busy share, not the free share, and double the real one
  • •(d) 2 — the share of CPU time the interrupts use, not the share left for other work

Key rule: CPU load from interrupts is the interrupt rate times the handling time per interrupt; then check whether the question asks for the busy share or the free share.

Computer Component · AI-written, may contain errors

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.