0
0
Operating Systemsknowledge~10 mins

C-SCAN (circular SCAN) in Operating Systems - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - C-SCAN (circular SCAN)
Start at current head position
Move head in one direction
Serve requests in order
Reach last request in direction
Jump to opposite end without serving
Continue moving in same direction
Repeat until all requests served
The disk head moves in one direction serving requests, then jumps back to the start without serving on return, continuing this cycle.
Execution Sample
Operating Systems
Requests = [40, 10, 22, 70, 90]
Head = 50
Direction = 'up'
Order = 'C-SCAN'

# Serve requests in ascending order from head, jump back to start after last request.
This simulates C-SCAN disk scheduling serving requests above head, then jumping to lowest request.
Analysis Table
StepHead PositionActionServed RequestNext Head Position
150Move up to next request7070
270Move up to next request9090
390Reached last request, jump to startNone10
410Move up to next request1010
510Move up to next request2222
622Move up to next request4040
740All requests served, stopNone40
💡 All requests served after completing one full C-SCAN cycle.
State Tracker
VariableStartAfter Step 1After Step 2After Step 3After Step 4After Step 5After Step 6Final
Head Position5070901010224040
Served Requests[][70][70,90][70,90][70,90,10][70,90,10,22][70,90,10,22,40][70,90,10,22,40]
Key Insights - 2 Insights
Why does the head jump from the last request back to the start without serving requests on the way back?
In C-SCAN, the head only serves requests moving in one direction to provide uniform wait times. The jump back is a fast move without serving, as shown in step 3 of the execution_table.
How does C-SCAN differ from SCAN in handling requests on the return trip?
Unlike SCAN, which serves requests on the return trip, C-SCAN skips serving requests when moving back, jumping directly to the start, as seen in the jump at step 3.
Visual Quiz - 3 Questions
Test your understanding
According to the execution_table, what is the head position after step 3?
A40
B10
C90
D50
💡 Hint
Check the 'Next Head Position' column for step 3 in the execution_table.
At which step does the head serve the request at position 22?
AStep 4
BStep 6
CStep 5
DStep 7
💡 Hint
Look at the 'Served Request' column in the execution_table to find when 22 is served.
If the head started at 30 instead of 50, how would the first served request change?
AIt would be 40
BIt would be 10
CIt would be 70
DIt would be 22
💡 Hint
Refer to the variable_tracker and execution_table logic: head serves requests greater than current position.
Concept Snapshot
C-SCAN moves disk head in one direction only.
Serves requests in order while moving up.
After last request, jumps to start without serving.
Provides uniform wait times.
Useful for fair disk scheduling.
Full Transcript
C-SCAN (Circular SCAN) is a disk scheduling method where the disk head moves in one direction, serving requests as it goes. When it reaches the last request in that direction, it jumps back to the beginning without serving any requests on the way back. This cycle repeats until all requests are served. This method helps provide more uniform wait times compared to SCAN, which serves requests in both directions. The execution table shows the head starting at position 50, serving requests at 70 and 90, then jumping back to 10 and serving remaining requests in ascending order. Variables track the head position and served requests step-by-step. Key moments clarify why the head jumps without serving and how C-SCAN differs from SCAN. The quiz tests understanding of head positions and serving order based on the execution visuals.