The Disk Scheduling Simulator & OS Storage Architecture Lab is an interactive, browser-based computer science laboratory designed to visualize, benchmark, and teach Operating System Storage Subsystems.
Bridging the gap between classical theoretical algorithms and real-world storage hardware, it simulates both Mechanical Magnetic Hard Disk Drives (HDDs) (with rotating platters and actuator arm kinematics) and NAND Flash NVMe Solid State Drives (SSDs) (with uniform zero-seek Flash Translation Layer controllers).
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SIMULATOR ARCHITECTURE β
βββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββ€
β ποΈ CONFIG & SPECS β π₯οΈ MULTI-VIEW ENGINE β π LIVE TELEMETRY β
β β’ 11 Schedulers β β’ π― 1D Linear Physical Track β β’ Total Seek Cyl β
β β’ Direction Toggleβ β’ π 2D Trajectory Seek Graphβ β’ Seek Latency ms β
β β’ Drive RPM (5.4k-β β’ π½ Concentric 2D Platter β β’ Rotational Delay β
β 15k RPM) β β’ π½ 3D Cylinder Multi-Stack β β’ Access Time ms β
β β’ HDD vs. SSD Modeβ β’ β‘ NVMe SSD NAND Die Grid β β’ Head Reversals β
β β’ Preset Workloadsβ β’ π§ Linux Kernel Multi-Queueβ β’ Live Progress β
β β’ Live I/O Stream β β’ π» In-Browser JS Sandbox β β’ Step Math Proof β
βββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββ
FCFS (First-Come, First-Served)SSTF (Shortest Seek Time First)SCAN (Elevator Algorithm β β High / β Low Directional)C-SCAN (Circular SCAN with rapid return)LOOK (Optimized Elevator reversing at boundary requests)C-LOOK (Circular LOOK)F-SCAN (Dual-Queue Freeze SCAN preventing starvation)N-Step SCAN (Batched SCAN with configurable batch size $N$)User Custom Sequence (Raw input trace verification)Linux Deadline Scheduler: Separate Read FIFO ($500\text{ ms}$) and Write FIFO ($5000\text{ ms}$) expiration queues alongside a sorted sector dispatcher.Linux CFQ (Completely Fair Queuing): Multi-process round-robin time-slicing across concurrent processes (MySQL vs Backup vs Video).Linux NOOP / None: Pure FIFO request merging with zero sorting overhead (the gold standard for NVMe SSDs).| Mode | Name | Visual Experience & Physical Details |
|---|---|---|
| π― | 1D Linear Track | High-DPI physical track with glowing magnetic head pointer (H), color-coded request nodes, seek arcs, and interactive tooltips. |
| π | 2D Seek Graph | OS textbook-style coordinate chart plotting Time Steps ($Y$-axis, top-to-bottom) vs. Cylinder Number ($X$-axis, left-to-right). |
| π½ | Concentric 2D Platter | Kinetic rotating magnetic platter ($0 \to \text{Max}$) with a mechanical actuator arm pivoting its read/write head tip over tracks. |
| π½ | 3D Cylinder Stack | Isometric stack of 3 platters (6 surfaces: Head 0 to Head 5) with a synchronized multi-head actuator comb demonstrating CHS addressing. |
| β‘ | NVMe SSD Flash Array | 4-channel, 16-die NAND Flash cell array demonstrating Flash Translation Layer (FTL) wear-leveling and zero mechanical seek penalty. |
| π§ | Linux Kernel Lab | Real-time multi-queue visualization showing Read FIFO, Write FIFO, and Sorted Dispatcher queues. |
| π» | In-Browser JS Sandbox | Integrated Monaco-style JavaScript code editor allowing students to write, execute, and test their own custom scheduling algorithms. |
Toggle between π½ Mechanical HDD and β‘ NVMe SSD with one click:
NOOP/none, showcasing uniform $\sim 0.04\text{ ms}$ latency across arbitrary logical block addresses.Built-in live mathematical translator converting between Cylinder-Head-Sector (CHS) and Logical Block Addressing (LBA): \(\text{LBA} = (C \times \text{HeadsPerCyl} + H) \times \text{SectorsPerTrack} + (S - 1)\)
V): Live Web Speech API voice synthesis announcing each cylinder seek.π₯ Streak), score tracking, and mathematical step explanations..md): Full formatted Markdown assignment report with LaTeX formulas, seek distance tables, and final metrics ready to submit for university coursework..csv): Raw numerical step-by-step dataset..png): One-click high-resolution diagram export.localStorage persistence.| Algorithm | Type | Time Complexity | Starvation Risk | Directional | Best Use Case |
|---|---|---|---|---|---|
| FCFS | Classical | $\mathcal{O}(N)$ | None (100% Fair) | No | Light, sequential workloads |
| SSTF | Classical | $\mathcal{O}(N^2)$ | High (Boundary Starvation) | No | Batch workloads with clustered requests |
| SCAN | Classical | $\mathcal{O}(N \log N)$ | None | Yes (β / β) | High-load shared HDD servers |
| C-SCAN | Classical | $\mathcal{O}(N \log N)$ | None | Yes (β / β) | Systems requiring uniform wait times |
| LOOK | Classical | $\mathcal{O}(N \log N)$ | None | Yes (β / β) | General-purpose desktop HDDs |
| C-LOOK | Classical | $\mathcal{O}(N \log N)$ | None | Yes (β / β) | High-throughput server workloads |
| F-SCAN | Classical | $\mathcal{O}(N \log N)$ | None | Yes (β / β) | High dynamic arrival environments |
| N-Step SCAN | Classical | $\mathcal{O}(N \log N)$ | None | Yes (β / β) | Systems prone to arm stickiness |
| Linux Deadline | Linux Kernel | $\mathcal{O}(N \log N)$ | Guaranteed None | Yes | Real-time & database servers (MySQL) |
| Linux CFQ | Linux Kernel | $\mathcal{O}(P \times N)$ | None | Round-Robin | Multi-user & desktop Linux systems |
| Linux NOOP | Linux Kernel | $\mathcal{O}(N)$ | None | No | NVMe SSDs, Flash, & Virtual Disks |
Disk access time is calculated using the official Operating Systems physics formulation:
\[\text{Total Access Time } (T_{\text{access}}) = T_{\text{seek}} + T_{\text{rotational}} + T_{\text{transfer}}\]The time required for the mechanical actuator arm to position the read/write head over the desired cylinder track: \(T_{\text{seek}} = T_{\text{startup}} + (\Delta C \times \text{Seek Rate})\)
The average time for the requested disk sector to rotate under the read/write head (equivalent to half a rotation): \(T_{\text{rotational}} = \frac{1}{2} \times \left(\frac{60}{\text{RPM}}\right) \times 1000\text{ ms}\)
| Spindle Speed (RPM) | Category | Average Rotational Delay |
|---|---|---|
| 5,400 RPM | Laptop / Power-Saving HDD | 5.56 ms |
| 7,200 RPM | Desktop Standard HDD | 4.17 ms |
| 10,000 RPM | VelociRaptor High-Performance | 3.00 ms |
| 15,000 RPM | Enterprise SAS / Server HDD | 2.00 ms |
| Shortcut | Action |
|---|---|
| Space | Play / Pause animation playback |
| β | Previous Step (Step backward) |
| β | Next Step (Step forward) |
| Home | Jump to Start (Initial head position) |
| End | Jump to End (Complete simulation) |
| R | Reset simulation state |
| T | Toggle Theme (Dark Obsidian β Light Academic) |
| V | Toggle AI Voice Narration |
| Canvas Click | Inject I/O Request at clicked cylinder/sector |
Because the project is built with Pure Vanilla Web Technologies, zero build tools or npm package installations are required.
python -m http.server 8000
Open http://localhost:8000/project.html in your browser.
Double click project.html directly in any modern web browser.
This project is licensed under the MIT License β see the LICENSE file for full details.