Which one or more of the following options guarantee that a computer system will transition from user mode to kernel mode?
GATE CSE 2023Operating System › Process Concepts, Threads & System CallsVerified
GATE CSE 2023 PYQ: Which one or more of the following options guarantee that a computer system will transition from user mode…
- AFunction Call
- Bmalloc Call
- CPage FaultCorrect answer
- DSystem CallCorrect answer
Answer
(C, D) Page Fault; System Call
Approach
Decide, for each option, whether the event necessarily forces the CPU to abandon user mode and begin executing privileged kernel code. Recognise that a genuine mode switch happens through a trap/interrupt/exception mechanism, not through ordinary control transfers inside user-space code.
Only events that go through a trap/exception/software-interrupt into the OS guarantee a change of privilege level. Page faults (hardware exception) and system calls (trap instruction) always do; ordinary function calls and typical malloc calls stay in user mode, and malloc only optionally enters the kernel.
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.