Skip to content
Official PYQ · 2001

GATE CS 2001 Q1.13 — Memory Management and Virtual Memory

Explain with AI

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

Choose one option
View worked solution

Answer: C

To understand mode transitions in a CPU, let us look at how the operating system manages execution modes:

  1. User Mode (Non-privileged) to Kernel Mode (Privileged): This transition occurs when an event requires the operating system's intervention. It is triggered by a hardware interrupt, a software interrupt (trap/system call), or an exception.
  2. Kernel Mode (Privileged) to User Mode (Non-privileged): When the operating system finishes its task (e.g., handling a system call or interrupt) and wants to return control to the user program, it must switch the CPU back to non-privileged mode.
    • This is done by executing a special instruction (such as IRET or SYSRET) that restores the program counter and resets the mode bit in the status register to non-privileged.
    • Since this instruction modifies critical system state (the processor status register), it must be a privileged instruction.
    • This instruction is executed directly by the OS and does not generate any interrupt.

Therefore, changing the mode from privileged to non-privileged requires a privileged instruction that does not generate an interrupt.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Memory Management and Virtual Memory questions