A CPU has two modes-privileged and non-privileged. In order to change the mode…

2001

A CPU has two modes-privileged and non-privileged. In order to change the mode from privileged to non-privileged

  1. A.

    A hardware interrupt is needed

  2. B.

    A software interrupt is needed

  3. C.

    A privileged instruction (which does not generate an interrupt) is needed

  4. D.

    A non-privileged instruction (which does not generate an interrupt) is needed

Attempted by 123 students.

Show answer & explanation

Correct answer: C

The correct answer is Option C. A transition from non-privileged mode to privileged mode must be controlled, normally through a trap, system call, or interrupt. But the question asks for the opposite direction: privileged to non-privileged. Since the CPU is already executing trusted privileged code, the operating system can execute a privileged instruction to set the mode bit back to non-privileged/user mode. This change does not need an interrupt.

Explore the full course: Gate Guidance By Sanchit Sir