Course contentsShow
← Computer Science
Lesson 1426 of 2,87232. File SystemsFree lesson

C-SCAN (Circular SCAN)

Providing more uniform wait times by returning to the beginning after reaching the end.

C-SCAN (Circular SCAN)

What You'll Learn

You'll learn how the C-SCAN disk scheduling algorithm improves upon SCAN by providing more uniform wait times across all disk requests.

The Problem with SCAN

Remember the SCAN (Elevator) algorithm? The disk head sweeps from one end of the disk to the other, servicing requests in both directions. While efficient, SCAN has a fairness problem: requests in the middle of the disk get serviced more frequently (twice per sweep), while requests near the ends wait longer between services.

How C-SCAN Works

C-SCAN (Circular SCAN) treats the disk as if it were circular, always scanning in one direction only. When the head reaches the end of the disk:

  1. It immediately returns to the beginning (cylinder 0) without servicing any requests on the return trip
  2. Then resumes scanning in the same direction

Think of it like a merry-go-round: you can only board at one specific spot as it comes around. The ride always moves in one direction and returns to the starting point before another cycle begins.

Why This Helps

By making the return trip instantaneous (relatively) and non-servicing, C-SCAN provides:

  • More uniform wait times — all requests wait roughly the same amount of time
  • Fairer service distribution — no area of the disk gets preferential treatment
  • Predictable maximum wait — approximately one full scan cycle

The trade-off is slightly longer average seek times compared to SCAN, since we waste the return journey. However, the improved fairness often makes this worthwhile in multi-user systems.

Example Pattern

If servicing requests at cylinders 20, 40, 80, and 10 starting from position 50:

  • Service: 80 → end → jump to 0 → 10 → 20 → 40

Key Takeaway: C-SCAN eliminates the directional bias of SCAN by treating the disk as circular, providing more uniform wait times at the cost of wasted return-trip seek time.