Operating Systems - Context Switch - Cost & CausesWhich of the following statements about context switching is INCORRECT?AContext switching involves saving the current process's CPU state into its PCBBThe scheduler directly saves and restores CPU registers during a context switchCContext switches can be triggered by interrupts or system callsDFrequent context switches increase CPU overhead and reduce throughputCheck Answer
Step-by-Step SolutionStep 1: Verify saving CPU stateSaving CPU state to PCB is true and essential for context switching.Step 2: Scheduler roleThe scheduler decides which process runs next but does not perform register saving/restoring; this is done by the OS kernel and hardware mechanisms.Step 3: Triggers for context switchInterrupts and system calls can trigger context switches, so this is correct.Step 4: Overhead of frequent switchesFrequent context switches increase overhead and reduce throughput, which is true.Final Answer:Option B -> Option BQuick Check:Scheduler does not directly save/restore registers; it manages process selection.Quick Trick: Scheduler selects process, kernel saves/restores registers [OK]Common Mistakes:MISTAKESAssuming scheduler handles register savingConfusing triggers of context switchUnderestimating overhead of frequent switchesTrap Explanation:PITFALLOption B sounds plausible but misattributes register saving to the scheduler, which is incorrect.Interviewer Note:CONTEXTTests ability to spot subtle misconceptions about OS component responsibilities.
Master "Context Switch - Cost & Causes" in Operating Systems2 interactive learning modes - each teaches the same concept differentlySolutionTrace
More Operating Systems Quizzes Banker's Algorithm - Safe State & Resource Allocation - Banker's Algorithm - Safe State & Resource Allocation - Quiz 5medium Deadlock - Four Necessary Conditions (Coffman) - Deadlock - Four Necessary Conditions (Coffman) - Quiz 6medium Dining Philosophers - Problem, Deadlock & Solution - Dining Philosophers - Problem, Deadlock & Solution - Quiz 13medium Internal vs External Fragmentation - Compaction & Buddy System - Internal vs External Fragmentation - Compaction & Buddy System - Quiz 1easy Paging vs Segmentation - Address Translation - Paging vs Segmentation - Address Translation - Quiz 13medium Starvation vs Deadlock vs Livelock - Differences & Examples - Starvation vs Deadlock vs Livelock - Differences & Examples - Quiz 5medium Starvation vs Deadlock vs Livelock - Differences & Examples - Starvation vs Deadlock vs Livelock - Differences & Examples - Quiz 4medium System Call - Mechanism & Modes (User vs Kernel) - System Call - Mechanism & Modes (User vs Kernel) - Quiz 6medium System Call - Mechanism & Modes (User vs Kernel) - System Call - Mechanism & Modes (User vs Kernel) - Quiz 3easy Thrashing - Working Set Model & Prevention - Thrashing - Working Set Model & Prevention - Quiz 8hard