Disk Scheduling Algorithms

Disk Scheduling Algorithms Visually

Disk Scheduling algorithms with visual animations. Learn FCFS, SSTF, SCAN, C-SCAN, LOOK, and C-LOOK with step-by-step visualization and seek time analysis.

Disk Scheduling FCFS Disk Scheduling SSTF Scheduling SCAN / C-SCAN LOOK / C-LOOK Head Movement Control Visual Simulation
Disk Scheduling Control
Current Position: 50
Total Seek Time: 0
Requests: 0
Disk Track (0-199) FCFS Algorithm
0 50 100 150 199
50
Request Queue
No requests in queue

0

Total Requests

0

Avg Seek Time

0

qqN

100%

Efficiency

Execution Timeline
No execution steps yet
Select algorithm and add requests to begin disk scheduling simulation

Disk Scheduling

Disk scheduling algorithms determine the order in which disk I/O requests are serviced to minimize seek time and maximize qqN.

  • Seek Time: Time to move disk arm to target track
  • Rotational Delay: Time for sector to rotate under head
  • Transfer Time: Time to read/write data
  • qqN: Number of requests served per unit time

FCFS Algorithm

First Come First Serve processes requests in the order they arrive, regardless of their position on the disk.

while (requests.length > 0) { next_request = requests.shift(); seek_time += abs(current_pos - next_request); current_pos = next_request; service_request(next_request); }

Characteristics:

  • Simple and fair implementation
  • No starvation of requests
  • Poor performance due to random seek patterns
  • High variance in response time

Algorithm Comparison

Algorithm Seek Time Fairness Starvation Complexity
FCFS Poor Excellent None Low
SSTF Good Poor Possible Medium
SCAN Good Good None Medium
C-SCAN Fair Excellent None Medium
LOOK Excellent Good None Medium
C-LOOK Excellent Excellent None High

Key Concepts

  • Locality of Reference: Requests tend to cluster in certain disk areas
  • Elevator Algorithm: SCAN moves like an elevator, serving requests in one direction
  • Starvation: Some requests may wait indefinitely in certain algorithms
  • Fairness: Equal treatment of all requests regardless of position

How to Use

  1. Select a disk scheduling algorithm
  2. Set initial head position (0-199)
  3. Add disk requests by entering track numbers
  4. Click Schedule to run the algorithm
  5. Use Step to see step-by-step execution
  6. Try Demo for predefined scenarios
  7. Click Reset to start over

Watch the disk arm movement and analyze seek time patterns!