Question

Let the time taken to switch between user and kernel modes of execution be t1t_1 while the time taken to switch between two processes be t2t_2. Which of the following is TRUE?

Choose one option
Official answer and solution
Official answer
C
From
Official GATE 2011 answer key

Solution

Compare the operations required for a mode switch versus a full process context switch.

  1. A mode switch (t1t_1) occurs when execution transitions between user mode and kernel mode (for instance, during a system call or hardware interrupt). The processor saves only the essential architectural registers (such as program counter and status register) and switches the execution privilege level, while retaining the same virtual address space without flushing TLB entries.
  1. A process context switch (t2t_2) occurs when the operating system switches execution from one process to a completely different process. This requires saving all CPU registers to the outgoing Process Control Block (PCB), loading the incoming process PCB, switching page tables (modifying the page table base register CR3), invalidating non-global TLB entries, and running scheduling algorithms.
  1. Because a process context switch includes a mode switch plus complete address space and state replacement, it strictly takes more time than a simple mode switch: t1<t2t_1 < t_2.
Final answer

C

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2011 Computer Science and Information Technology (CS)
Question
6 of 65, printed as CS Q.6
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.