Skip to content
Official PYQ · 2000

GATE CS 2000 Q1.20 — Processes and Threads

Explain with AI

Which of the following need not necessarily be saved on a context switch between processes?

Choose one option
View worked solution

Answer: B

During a context switch between two processes, the operating system must save the execution state (context) of the currently running process to its Process Control Block (PCB) so that it can be resumed later from the exact same state.

Let's analyze the options:

  • Program Counter (PC): Must be saved because it points to the next instruction to be executed when the process resumes.
  • General Purpose Registers (GPRs): Must be saved because they hold active operands and temporary data currently being used by the process.
  • Translation Look-aside Buffer (TLB): The TLB is a hardware cache for virtual-to-physical address translations. During a context switch:
    • In basic architectures, the TLB is simply invalidated (flushed) because the new process has a completely different virtual address space.
    • In modern architectures supporting Address Space Identifiers (ASIDs), TLB entries of different processes coexist in the cache tagged with their respective process IDs.
    In neither case are the TLB contents saved to memory and restored back.

Therefore, the Translation Look-aside Buffer (TLB) need not be saved on a context switch.

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

Published
Report a correction
Keep exploringMore Processes and Threads questions