IPA FE Subject A sample Question 10

A question IPA Japan published in 基本情報技術者試験 科目A サンプル問題 問10, translated into English. ITPEC is based on the same exams.

Same question on ITPEC: Oct 2020 Q11

Which of the following causes an external interrupt?

Explanation

A timer signalling that time has elapsed — the signal comes from hardware outside the running program, which makes it an external interrupt.

External interrupts are raised by sources independent of the instruction being executed: timers, I/O completion, power failure, a hardware fault. Internal interrupts (exceptions) are raised by the program itself while the CPU executes an instruction.

Answer (a)

Why not others:

  • •(b) — a division by zero is detected by the CPU while executing that instruction: an internal interrupt
  • •(c) — an undefined operation code is also detected while decoding the program's own instruction: internal
  • •(d) — a page fault is raised when the executing instruction accesses a page not in main memory: internal

Key rule: Ask whether the interrupt would happen again if the same instruction ran with the same data: if so it is internal (caused by the program); if it depends on outside events such as timers or I/O, it is external.

Computer Component · AI-written, may contain errors

This question comes from the past questions IPA Japan publishes, translated into English by ITPEC Practice. ITPEC Practice is an independent study tool and is not affiliated with IPA or ITPEC. See the original paper (PDF) or Report an issue.