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
- A.
A hardware interrupt is needed
- B.
A software interrupt is needed
- C.
A privileged instruction (which does not generate an interrupt) is needed
- 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.