Let the time taken to switch from user mode to kernel mode of execution be while time taken to switch between two user processes be . Which of the following is correct?
GATE CSE 2011Operating System › Process Concepts, Threads & System CallsVerified
GATE CSE 2011 PYQ: Let the time taken to switch from user mode to kernel mode of execution be T 1 T1 T 1 while time taken to…
- A
- B
- CCorrect answer
- DNothing can be said about the relation between and
Answer
(C) T 1 < T 2 T1 < T2 T 1 < T 2
Approach
Compare the work performed by a user-to-kernel mode switch with that of a process-to-process context switch. A mode switch mainly changes the CPU privilege level and transfers control to the kernel, whereas switching between two user processes additionally requires saving and restoring process state such as the PCB, registers, and memory-management information.
Switching from user mode to kernel mode is a hardware-supported privilege-level change, while switching between two user processes is a full context switch that also saves and restores process state. Thus the full process switch takes longer, giving T1 < T2.
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.