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 Critical Section Problem - Requirements & Peterson's Solution - Critical Section Problem - Requirements & Peterson's Solution - Quiz 4medium Deadlock - Four Necessary Conditions (Coffman) - Deadlock - Four Necessary Conditions (Coffman) - Quiz 10hard Dining Philosophers - Problem, Deadlock & Solution - Dining Philosophers - Problem, Deadlock & Solution - Quiz 10hard Dining Philosophers - Problem, Deadlock & Solution - Dining Philosophers - Problem, Deadlock & Solution - Quiz 6medium Producer-Consumer Problem Using Semaphores - Producer-Consumer Problem Using Semaphores - Quiz 14medium Producer-Consumer Problem Using Semaphores - Producer-Consumer Problem Using Semaphores - Quiz 2easy Round Robin Scheduling - Quantum & Turnaround Time - Round Robin Scheduling - Quantum & Turnaround Time - Quiz 13medium Semaphore vs Mutex - When to Use Which - Semaphore vs Mutex - When to Use Which - Quiz 7medium Shortest Job First (SJF) - Preemptive vs Non-Preemptive - Shortest Job First (SJF) - Preemptive vs Non-Preemptive - Quiz 4medium System Call - Mechanism & Modes (User vs Kernel) - System Call - Mechanism & Modes (User vs Kernel) - Quiz 2easy