Skip to content
Official PYQ · 2011

GATE CS 2011 Q6 — Processes and Threads

Explain with AI

Let the time taken to switch from user mode to kernel mode of execution be T1T1 while time taken to switch between two user processes be T2T2. Which of the following is correct?

Choose one option
View worked solution

Answer: C

To compare the two times, let's analyze what happens during each switch:

  • Mode Switch (T1T1): This occurs when a user process makes a system call, or when an interrupt/exception is raised. The CPU switches its execution privilege level from user mode to kernel mode within the context of the same process. Only a minimal state (such as the Program Counter, Stack Pointer, and Processor Status Word) is saved onto the kernel stack. No change of address space is required, making this a very lightweight operation.
  • Process Switch (T2T2): This is a full context switch between two different user processes. It requires saving the entire CPU state of the current process into its Process Control Block (PCB), running the scheduler to select the next process, and switching the memory address space (updating the page table base register, which typically flushes the Translation Lookaside Buffer (TLB)). Finally, the state of the new process is loaded.

Since a process switch (T2T2) involves significant memory management and scheduling overhead in addition to mode switching, it is much more time-consuming than a simple mode switch (T1T1).

Therefore, T1<T2T1 < T2.

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

Published
Report a correction
Keep exploringMore Processes and Threads questions