User Guide

Everything you need to get started

What the simulator does, how to enter your data, how to drive the animation, and how to read the results — in a few minutes.

Overview

The Disk Scheduling Visualizer is an interactive tool for the classic operating-systems problem of ordering pending disk I/O requests. You give it a queue of cylinder numbers and a starting head position; it computes the path a chosen algorithm would take and animates the read/write head servicing each request.

Two views are available:

  • Graph — animates a single algorithm step by step, on both an SVG disk and a seek-path chart.
  • Compare — runs all six algorithms on the same input and charts their total seek time side by side.

The goal of every algorithm is to minimise total seek time — the sum of the distances the head travels. Watch that number as you play.

1 Quick start

  1. Open the simulator. Head to the Simulate page.
  2. Pick an algorithm from the dropdown (FCFS, SSTF, SCAN, C-SCAN, LOOK or C-LOOK).
  3. Enter the request queue as space-separated cylinder numbers, e.g. 98 183 37 122 14 124 65 67.
  4. Set the initial cylinder (where the head starts) and the last cylinder (the highest track number on the disk).
  5. Choose a direction (Left or Right) — this only appears for the sweep-based algorithms.
  6. Click Graph. The disk and chart load with the head at its start position.
  7. Press ▶ Play (or the Space key) and watch the head service each request.

2 Input reference

FieldWhat to enterExample
AlgorithmThe scheduling strategy to visualize.SSTF
Sequence of cylindersThe pending requests, as whole numbers separated by spaces.98 183 37 122 14
Initial cylinderThe track the head currently rests on.53
Last cylinderThe highest track number on the disk (its outer bound).199
DirectionWhich way the head sweeps first — shown only for SCAN, C-SCAN, LOOK and C-LOOK.Left

Rules: the last cylinder must be greater than every request and greater than the initial cylinder. Requests are whole numbers separated by single spaces — no commas.

3 Playback & shortcuts

Once a graph is loaded, drive the animation with the control bar below the disk, or with the keyboard.

ControlActionShortcut
▶ / ⏸ Play / PauseRuns or pauses the step-by-step animation.Space
▶| Step forwardAdvances the head to the next request.
Step backReturns the head to the previous request.
ResetReturns to the starting position.R
Speed sliderSets the time per step, from 100 ms to 2000 ms.

Keyboard shortcuts are ignored while you are typing in an input field, so they never interfere with entering data.

4 Reading the disk

The animation runs on two synchronised views. On the SVG platter, each pending request sits on its own concentric track, and the head arm rotates to the current cylinder. On the seek chart, the path is drawn one segment at a time, with the running seek total shown beneath it.

Request markers change colour to show progress:

Pending — not yet served Current — the head is here now Served — already visited

The Step N / Total indicator and the live Seek value update on every move, so you can pause at any point and read the exact cost so far.

5 Compare mode

Fill in the same inputs, then click Compare instead of Graph. The tool runs FCFS, SSTF, SCAN, C-SCAN, LOOK and C-LOOK on your request queue and plots each one's total seek time as a bar chart.

The algorithm (or algorithms) with the lowest total is highlighted and named below the chart — a quick way to see which strategy is optimal for a given workload.

6 Algorithm reference

AlgorithmHow it movesUses direction?
FCFSServes requests in arrival order — no reordering.No
SSTFAlways jumps to the nearest pending request.No
SCANSweeps to the disk edge in one direction, then reverses.Yes
C-SCANSweeps to the edge, jumps back to the start, sweeps again.Yes
LOOKLike SCAN, but reverses at the last request, not the edge.Yes
C-LOOKLike C-SCAN, but jumps back from the farthest request.Yes

7 Tips

  • Slow the speed slider right down and use to step through a tricky sweep one move at a time.
  • Use Compare first to spot the best algorithm, then Graph it to see why it wins.
  • Try the same queue with Left vs Right direction to see how the initial choice changes total seek time.
  • A classic textbook example: queue 98 183 37 122 14 124 65 67, initial 53, last 199.

That's everything — go explore.

The best way to understand disk scheduling is to watch it happen.