Skip to content
We areTOP 1%

Compare FCFS, SSTF, SCAN and C-SCAN disk scheduling.

HardConceptFile Systems & Disk Scheduling
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews

Answer

On a hard disk drive (HDD), the slowest part of an access is the seek: moving the read/write head to the right track (cylinder). Disk scheduling orders pending requests to reduce total head movement; SSDs have no moving head, so it matters mainly for HDDs.

  • FCFS: serve requests in arrival order. It is fair, but the head may swing back and forth.
  • SSTF (Shortest Seek Time First): serve the nearest request next. Movement is low, but far-away requests can starve.
  • SCAN (the elevator algorithm): sweep in one direction to the end of the disk, serving requests, then reverse. Nothing starves.
  • C-SCAN (circular SCAN): serve in one direction only, then jump back to the start, which gives more uniform waiting times. LOOK and C-LOOK turn at the last request instead of the edge.

Example: cylinders 0–99, head at 50 moving up, requests 20, 70, 10, 90.

FCFS, order 50, 20, 70, 10, 90: 30 + 50 + 60 + 80 = 220.

SSTF, order 50, 70, 90, 20, 10: 20 + 20 + 70 + 10 = 120.

SCAN, up to 99 and then down to 10: 49 + 89 = 138.

C-SCAN, up to 99, jump to 0, then up to 20: 49 + 99 + 20 = 168, counting the jump.

More in File Systems & Disk Scheduling

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account