ITPEC FE Morning April 2018 Question 19

Source exam: ITPEC FE Morning April 2018Topic: Computer Systems & Hardware

ITPEC FE Morning April 2018 — Question 19 of 80

Context Switch (Process Switching) — the OS procedure for switching the CPU from one process to another.

When an interrupt occurs, the OS performs three steps in order:

  • A: Saving of the running state — save the current process's context (registers, program counter) so it can resume later
  • B: Selection of the process — the scheduler picks the next process from the ready queue
  • C: Restoration of the running state — load the selected process's saved context into the CPU

The fixed order is always: Save → Select → Restore

Why not others:
- (a) Restore before Save — cannot restore a new process without first saving the old one

- (b) Restore before Select — cannot restore a process that hasn't been selected yet

- (d) Select before Save — selecting a new process before saving the current one risks losing its state

Key rule: Context switch order is always Save → Select → Restore. The current process must be preserved before any new process can be chosen or loaded.

AI-generated — may contain errors

The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.

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.