GATE / CS ARCHIVE

GATE CSE 2008 / QUESTION 34

Return-from-exception instruction requirements

Computer Organization & Architecture · Instructions & Addressing Modes · Full GATE CSE 2008 paper

GATE 2008, Q34 2 marks · MCQ
Report issue

Instructions & Addressing Modes

Question 34, GATE 2008: Which must be true of RFE (return from exception) on a general-purpose processor? I: it must be a trap instruction. II: it must be privileged. III: no exception can be allowed during its execution.

(A) I only
(B) II only
(C) I and II only
(D) I,II,III
Tap to enlarge
Your answer
Answer & solution

Answer: B in the conventional privileged-return model (no official key was published)

1. RFE restores saved execution/control state and may change privilege, so the conventional architecture restricts its use to privileged code: II. It returns from a trap rather than being required to generate one, so I is false.
2. A processor may define exceptions/faults during a return, for example invalid saved state, so III is not universally required. Therefore B under the conventional model.
3. Architectures can instead permit restricted unprivileged returns that cannot escalate privilege, so the broad must wording is architecture-dependent.

Original paper, page 6