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 Dining Philosophers - Problem, Deadlock & Solution - Dining Philosophers - Problem, Deadlock & Solution - Quiz 5medium Disk Scheduling - SSTF, SCAN, C-SCAN - Disk Scheduling - SSTF, SCAN, C-SCAN - Quiz 3easy File Allocation Methods - Contiguous, Linked, Indexed - File Allocation Methods - Contiguous, Linked, Indexed - Quiz 14medium Inode Structure - File Metadata & Block Pointers - Inode Structure - File Metadata & Block Pointers - Quiz 3easy Internal vs External Fragmentation - Compaction & Buddy System - Internal vs External Fragmentation - Compaction & Buddy System - Quiz 2easy Process State Machine - Five-State Model - Process State Machine - Five-State Model - Quiz 1easy Round Robin Scheduling - Quantum & Turnaround Time - Round Robin Scheduling - Quantum & Turnaround Time - Quiz 9hard 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 10hard Starvation vs Deadlock vs Livelock - Differences & Examples - Starvation vs Deadlock vs Livelock - Differences & Examples - Quiz 3easy