Operating Systems - Disk Scheduling - SSTF, SCAN, C-SCANComparing SCAN and C-SCAN algorithms, what is the main difference in their time complexity and why?ABoth have O(N) time complexity, but C-SCAN may have higher average wait due to head jumping backBSCAN has O(N^2) due to reversing direction, C-SCAN is O(N) because it moves in one direction onlyCC-SCAN has O(log N) complexity using circular buffers, SCAN is O(N) linear scanDSCAN is O(N) but C-SCAN is O(N^2) because of the jump back to startCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand SCAN and C-SCAN operationsBoth algorithms scan requests linearly in one direction per cycle.Step 2: Analyze time complexityBoth process N requests in O(N) time per cycle.Step 3: Consider head movement differencesC-SCAN jumps back to start without servicing requests on return, possibly increasing wait times but not complexity.Final Answer:Option A -> Option AQuick Check:Both linear scans -> O(N), C-SCAN's jump affects wait, not complexity [OK]Quick Trick: SCAN and C-SCAN both scan linearly -> O(N) time [OK]Common Mistakes:MISTAKESConfusing jump back with extra complexityAssuming reversing doubles complexityTrap Explanation:PITFALLCandidates mistake physical head jumps for increased algorithmic complexity.Interviewer Note:CONTEXTTests understanding of complexity vs physical head movement effects.
Master "Disk Scheduling - SSTF, SCAN, C-SCAN" in Operating Systems2 interactive learning modes - each teaches the same concept differentlySolutionTrace
More Operating Systems Quizzes Context Switch - Cost & Causes - Context Switch - Cost & Causes - Quiz 14medium Critical Section Problem - Requirements & Peterson's Solution - Critical Section Problem - Requirements & Peterson's Solution - Quiz 1easy Deadlock - Four Necessary Conditions (Coffman) - Deadlock - Four Necessary Conditions (Coffman) - Quiz 10hard Inode Structure - File Metadata & Block Pointers - Inode Structure - File Metadata & Block Pointers - Quiz 15hard Inode Structure - File Metadata & Block Pointers - Inode Structure - File Metadata & Block Pointers - Quiz 2easy 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 3easy Process vs Thread - Key Differences - Process vs Thread - Key Differences - Quiz 8hard Round Robin Scheduling - Quantum & Turnaround Time - Round Robin Scheduling - Quantum & Turnaround Time - Quiz 10hard Starvation vs Deadlock vs Livelock - Differences & Examples - Starvation vs Deadlock vs Livelock - Differences & Examples - Quiz 13medium