Skip to content

Commit 0720d99

Browse files
docs: enrich README with aesthetic styling, feature matrix, and developer profile
1 parent eab70dc commit 0720d99

1 file changed

Lines changed: 151 additions & 59 deletions

File tree

‎README.md‎

Lines changed: 151 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,183 @@
1+
<div align="center">
2+
13
# 💽 Disk Scheduling Simulator & OS Storage Architecture Lab
4+
### *A Next-Generation Interactive Operating Systems Simulator & Hardware Physics Suite*
5+
6+
[![GitHub stars](https://img.shields.io/github/stars/Priya-Ranjan-0201/Disk_Scheduling_Algorithm?style=for-the-badge&color=ffd700)](https://github.com/Priya-Ranjan-0201/Disk_Scheduling_Algorithm/stargazers)
7+
[![GitHub forks](https://img.shields.io/github/forks/Priya-Ranjan-0201/Disk_Scheduling_Algorithm?style=for-the-badge&color=6366f1)](https://github.com/Priya-Ranjan-0201/Disk_Scheduling_Algorithm/network/members)
8+
[![License: MIT](https://img.shields.io/badge/License-MIT-10b981?style=for-the-badge)](https://opensource.org/licenses/MIT)
9+
[![Pure Vanilla JS](https://img.shields.io/badge/Built%20With-Vanilla%20JS%20%7C%20HTML5%20%7C%20CSS3-f97316?style=for-the-badge)](#)
10+
[![Zero Dependencies](https://img.shields.io/badge/Dependencies-Zero%20(No%20npm%20needed)-06b6d4?style=for-the-badge)](#)
11+
12+
<br/>
213

3-
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
4-
[![Pure Vanilla JS](https://img.shields.io/badge/Built%20With-Vanilla%20JS%20%7C%20HTML5%20%7C%20CSS3-orange.svg)](#)
5-
[![Zero Dependencies](https://img.shields.io/badge/Dependencies-Zero%20(No%20npm%20needed)-brightgreen.svg)](#)
6-
[![HTML5 Canvas](https://img.shields.io/badge/Visualization-HTML5%20Canvas%202D%20%26%203D-purple.svg)](#)
7-
[![Web Audio API](https://img.shields.io/badge/Audio-Web%20Audio%20%26%20Speech%20API-red.svg)](#)
14+
**[⚡ Live Demo](http://localhost:8000/project.html)** • **[📖 Documentation](#-complete-feature-matrix)** • **[🧠 Algorithms](#-supported-scheduling-algorithms)** • **[⏱️ Hardware Physics](#-hardware-drive-physics--latency-equations)** • **[👨‍💻 Developed By](#-developed--maintained-by)**
815

9-
A state-of-the-art, interactive educational suite and hardware physics lab for exploring Operating System **Disk Scheduling Algorithms** (Classical & Linux Kernel) and **Storage Hardware Architecture** (Mechanical Magnetic HDDs vs. NAND Flash NVMe SSDs).
16+
</div>
17+
18+
---
1019

11-
Designed for university OS courses, computer architecture labs, and systems software engineers.
20+
## 🌌 Overview
21+
22+
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**.
23+
24+
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).
25+
26+
```
27+
┌─────────────────────────────────────────────────────────────────────────┐
28+
│ SIMULATOR ARCHITECTURE │
29+
├───────────────────┬───────────────────────────────┬─────────────────────┤
30+
│ 🎛️ CONFIG & SPECS │ 🖥️ MULTI-VIEW ENGINE │ 📊 LIVE TELEMETRY │
31+
│ • 11 Schedulers │ • 🎯 1D Linear Physical Track │ • Total Seek Cyl │
32+
│ • Direction Toggle│ • 📈 2D Trajectory Seek Graph│ • Seek Latency ms │
33+
│ • Drive RPM (5.4k-│ • 💽 Concentric 2D Platter │ • Rotational Delay │
34+
│ 15k RPM) │ • 💽 3D Cylinder Multi-Stack │ • Access Time ms │
35+
│ • HDD vs. SSD Mode│ • ⚡ NVMe SSD NAND Die Grid │ • Head Reversals │
36+
│ • Preset Workloads│ • 🐧 Linux Kernel Multi-Queue│ • Live Progress │
37+
│ • Live I/O Stream │ • 💻 In-Browser JS Sandbox │ • Step Math Proof │
38+
└───────────────────┴───────────────────────────────┴─────────────────────┘
39+
```
1240

1341
---
1442

1543
## 🌟 Complete Feature Matrix
1644

17-
### 1. 🎛️ 11 Scheduling Algorithms & Linux Kernel Schedulers
45+
### 🎛️ 1. Eleven Scheduling & Linux Kernel Algorithms
1846
- **Classical OS Schedulers**:
19-
- **FCFS** (First-Come, First-Served)
20-
- **SSTF** (Shortest Seek Time First)
21-
- **SCAN** (Elevator Algorithm — ↗ High / ↙ Low Directional)
22-
- **C-SCAN** (Circular SCAN)
23-
- **LOOK** (Optimized Elevator)
24-
- **C-LOOK** (Circular LOOK)
25-
- **F-SCAN** (Dual-Queue Freeze SCAN)
26-
- **N-Step SCAN** (Batched SCAN with configurable $N$)
27-
- **User Custom Sequence**
47+
- `FCFS` (First-Come, First-Served)
48+
- `SSTF` (Shortest Seek Time First)
49+
- `SCAN` (Elevator Algorithm — ↗ High / ↙ Low Directional)
50+
- `C-SCAN` (Circular SCAN with rapid return)
51+
- `LOOK` (Optimized Elevator reversing at boundary requests)
52+
- `C-LOOK` (Circular LOOK)
53+
- `F-SCAN` (Dual-Queue Freeze SCAN preventing starvation)
54+
- `N-Step SCAN` (Batched SCAN with configurable batch size $N$)
55+
- `User Custom Sequence` (Raw input trace verification)
2856
- **Modern Linux Kernel Schedulers**:
29-
- **Linux Deadline Scheduler**: Separate Read/Write FIFO deadline queues ($500\text{ ms}$ Read / $5000\text{ ms}$ Write) alongside sorted sector sweep.
30-
- **Linux CFQ (Completely Fair Queuing)**: Multi-process round-robin time-slicing across concurrent processes (e.g. MySQL vs Backup vs Player).
31-
- **Linux NOOP / None**: Simple FIFO request merging; optimal standard for NVMe SSDs.
57+
- `Linux Deadline Scheduler`: Separate Read FIFO ($500\text{ ms}$) and Write FIFO ($5000\text{ ms}$) expiration queues alongside a sorted sector dispatcher.
58+
- `Linux CFQ (Completely Fair Queuing)`: Multi-process round-robin time-slicing across concurrent processes (`MySQL` vs `Backup` vs `Video`).
59+
- `Linux NOOP / None`: Pure FIFO request merging with zero sorting overhead (the gold standard for NVMe SSDs).
3260

3361
---
3462

35-
### 2. 🖥️ 7 Interactive Multi-Dimensional Visualizers
63+
### 🖥️ 2. Seven Interactive Multi-Dimensional Visualizers
3664

37-
| Tab | Visualizer | Description |
38-
| :--- | :--- | :--- |
39-
| **🎯 1D Track** | Linear Track View | High-DPI track line with glowing head pointer (`H`), color-coded request nodes, seek arcs, and tooltips. |
40-
| **📈 2D Graph** | OS Textbook Seek Chart | Time Steps ($Y$-axis, top-to-bottom) vs. Cylinder Number ($X$-axis, left-to-right). |
41-
| **💽 Platter 2D** | Concentric Hard Disk Platter | Kinetic spinning disk with concentric circular tracks ($0 \to \text{Max}$) and pivoting mechanical actuator arm. |
42-
| **💽 3D Cylinder** | 3D Multi-Platter Stack | Isometric stack of 3 platters (6 surfaces: Head 0 to Head 5) with a synchronized multi-head actuator comb. |
43-
| **⚡ SSD Flash** | NAND Flash Memory Array | Visualizes Flash Translation Layer (FTL), channels, dies, blocks, and pages with zero mechanical seek. |
44-
| **🐧 Linux Kernel** | Linux Queue Architecture | Live multi-queue breakdown showing Read FIFO, Write FIFO, and Sorted Dispatcher. |
45-
| **💻 Code Sandbox** | In-Browser JS IDE | Live JavaScript code editor to write, test, and benchmark custom scheduling algorithms. |
65+
| Mode | Name | Visual Experience & Physical Details |
66+
| :---: | :--- | :--- |
67+
| 🎯 | **1D Linear Track** | High-DPI physical track with glowing magnetic head pointer (`H`), color-coded request nodes, seek arcs, and interactive tooltips. |
68+
| 📈 | **2D Seek Graph** | OS textbook-style coordinate chart plotting Time Steps ($Y$-axis, top-to-bottom) vs. Cylinder Number ($X$-axis, left-to-right). |
69+
| 💽 | **Concentric 2D Platter** | Kinetic rotating magnetic platter ($0 \to \text{Max}$) with a mechanical actuator arm pivoting its read/write head tip over tracks. |
70+
| 💽 | **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. |
71+
| ⚡ | **NVMe SSD Flash Array** | 4-channel, 16-die NAND Flash cell array demonstrating Flash Translation Layer (FTL) wear-leveling and zero mechanical seek penalty. |
72+
| 🐧 | **Linux Kernel Lab** | Real-time multi-queue visualization showing Read FIFO, Write FIFO, and Sorted Dispatcher queues. |
73+
| 💻 | **In-Browser JS Sandbox** | Integrated Monaco-style JavaScript code editor allowing students to write, execute, and test their own custom scheduling algorithms. |
4674

4775
---
4876

49-
### 3. ⚡ Storage Architecture: HDD vs. NVMe SSD
77+
### ⚡ 3. Storage Hardware Architecture: Mechanical HDD vs. NVMe SSD
5078

51-
Toggle between **💽 Mechanical HDD** and **⚡ NVMe SSD**:
52-
- **HDD Mode**: Calculates mechanical seek time + rotational latency ($\approx 4\text{ to } 10\text{ ms}$).
53-
- **SSD Mode**: Demonstrates zero mechanical seek penalty ($\sim 0.04\text{ ms}$ uniform latency via PCIe Gen 4 FTL Controller), illustrating why classical elevator schedulers are replaced with NOOP on solid-state drives.
79+
Toggle between **💽 Mechanical HDD** and **⚡ NVMe SSD** with one click:
80+
- **Mechanical HDD Mode**:
81+
- Accurately models physical actuator arm acceleration ($2.0\text{ ms startup} + \Delta C \times 0.15\text{ ms/cyl}$) and rotational delays across $5400$, $7200$, $10000$, and $15000\text{ RPM}$ spindles.
82+
- **NAND Flash NVMe SSD Mode**:
83+
- Demonstrates why classical elevator schedulers are bypassed on SSDs in favor of `NOOP`/`none`, showcasing uniform $\sim 0.04\text{ ms}$ latency across arbitrary logical block addresses.
5484

5585
---
5686

57-
### 4. 📐 CHS ↔ LBA Translation Calculator
58-
Converts between Cylinder-Head-Sector addressing and Logical Block Addressing:
87+
### 📐 4. CHS ↔ LBA Translation Calculator
88+
Built-in live mathematical translator converting between **Cylinder-Head-Sector (CHS)** and **Logical Block Addressing (LBA)**:
5989
$$\text{LBA} = (C \times \text{HeadsPerCyl} + H) \times \text{SectorsPerTrack} + (S - 1)$$
6090

6191
---
6292

63-
### 5. 🎞️ Interactive Timeline Scrubber & Media Controls
64-
- **Drag-to-Scrub Timeline**: Scrub smoothly through any point in the simulation history like a video player.
65-
- **Playback Suite**: Play, Pause, Next Step, Prev Step, Jump to Start, Jump to End, Reset, and Variable Speed ($1\times \to 5\times$).
93+
### 🎞️ 5. Interactive Drag-to-Scrub Timeline & Voice Narration
94+
- **Video-Style Scrubber**: Drag continuously through the seek history to inspect head positions at any micro-step.
95+
- **AI Voice Narration (`V`)**: Live Web Speech API voice synthesis announcing each cylinder seek.
96+
- **Binaural Stereo Audio**: Web Audio stereo panner that pans sound left-to-right matching the head's physical cylinder position.
6697

6798
---
6899

69-
### 6. 🎙️ Web Speech Voice Narration & Spatial Audio
70-
- **AI Voice Narration (`V`)**: Synthesizes step-by-step vocal explanations in real time using the Web Speech API.
71-
- **Binaural Audio Panning**: Web Audio stereo panner that pans sound left-to-right matching the head's physical cylinder position.
100+
### 🎓 6. Gamified OS Exam Quiz Arena
101+
- Procedurally generated university exam questions testing next-cylinder predictions.
102+
- Multiple-choice cards, streak tracker (`🔥 Streak`), score tracking, and mathematical step explanations.
72103

73104
---
74105

75-
### 7. 🎓 Gamified OS Exam Quiz Arena
76-
- Procedurally generated scenario questions testing next-cylinder predictions.
77-
- Multiple-choice cards, streak tracker (`🔥 Streak`), score tracking, and mathematical explanations.
106+
### 📄 7. Homework Solution & Data Export Suite
107+
- **📄 Homework Solution (`.md`)**: Full formatted Markdown assignment report with LaTeX formulas, seek distance tables, and final metrics ready to submit for university coursework.
108+
- **📊 Telemetry Dataset (`.csv`)**: Raw numerical step-by-step dataset.
109+
- **🖼️ Canvas Snapshot (`.png`)**: One-click high-resolution diagram export.
78110

79111
---
80112

81-
### 8. 📄 Homework Solution, Telemetry & Snapshot Exporter
82-
- **📄 Homework Solution (`.md`)**: Full formatted Markdown assignment solution with LaTeX formulas and step tables ready to submit for university coursework.
83-
- **📊 Telemetry Dataset (`.csv`)**: Raw numerical step-by-step dataset.
84-
- **🖼️ Canvas Snapshot (`.png`)**: One-click high-resolution diagram export.
113+
### 🌓 8. Dual Theme Engine
114+
- **Dark Obsidian Glass** (Cyberpunk neon glow, default)
115+
- **Light Academic Paper** (High-contrast, classroom projector friendly)
116+
- Toggle instantly via Header button or <kbd>T</kbd> shortcut with `localStorage` persistence.
85117

86118
---
87119

88-
### 9. 🌓 Dual Theme Engine
89-
- **Dark Obsidian Glass** (default, glowing neon cyberpunk accents)
90-
- **Light Academic Paper** (clean, high-contrast, classroom projector friendly)
91-
- Instant toggle via Header button or `T` shortcut with `localStorage` persistence.
120+
## 🧠 Supported Scheduling Algorithms Comparison
121+
122+
| Algorithm | Type | Time Complexity | Starvation Risk | Directional | Best Use Case |
123+
| :--- | :---: | :---: | :---: | :---: | :--- |
124+
| **FCFS** | Classical | $\mathcal{O}(N)$ | None (100% Fair) | No | Light, sequential workloads |
125+
| **SSTF** | Classical | $\mathcal{O}(N^2)$ | High (Boundary Starvation) | No | Batch workloads with clustered requests |
126+
| **SCAN** | Classical | $\mathcal{O}(N \log N)$ | None | Yes (↗ / ↙) | High-load shared HDD servers |
127+
| **C-SCAN** | Classical | $\mathcal{O}(N \log N)$ | None | Yes (↗ / ↙) | Systems requiring uniform wait times |
128+
| **LOOK** | Classical | $\mathcal{O}(N \log N)$ | None | Yes (↗ / ↙) | General-purpose desktop HDDs |
129+
| **C-LOOK** | Classical | $\mathcal{O}(N \log N)$ | None | Yes (↗ / ↙) | High-throughput server workloads |
130+
| **F-SCAN** | Classical | $\mathcal{O}(N \log N)$ | None | Yes (↗ / ↙) | High dynamic arrival environments |
131+
| **N-Step SCAN**| Classical | $\mathcal{O}(N \log N)$ | None | Yes (↗ / ↙) | Systems prone to arm stickiness |
132+
| **Linux Deadline**| Linux Kernel | $\mathcal{O}(N \log N)$ | Guaranteed None | Yes | Real-time & database servers (MySQL) |
133+
| **Linux CFQ** | Linux Kernel | $\mathcal{O}(P \times N)$ | None | Round-Robin | Multi-user & desktop Linux systems |
134+
| **Linux NOOP** | Linux Kernel | $\mathcal{O}(N)$ | None | No | **NVMe SSDs, Flash, & Virtual Disks** |
135+
136+
---
137+
138+
## ⏱️ Hardware Drive Physics & Latency Equations
139+
140+
Disk access time is calculated using the official Operating Systems physics formulation:
141+
142+
$$\text{Total Access Time } (T_{\text{access}}) = T_{\text{seek}} + T_{\text{rotational}} + T_{\text{transfer}}$$
143+
144+
### 1. Seek Time ($T_{\text{seek}}$)
145+
The time required for the mechanical actuator arm to position the read/write head over the desired cylinder track:
146+
$$T_{\text{seek}} = T_{\text{startup}} + (\Delta C \times \text{Seek Rate})$$
147+
- Default: $2.0\text{ ms startup} + (\text{Seek Cylinders} \times 0.15\text{ ms/cyl})$
148+
149+
### 2. Average Rotational Latency ($T_{\text{rotational}}$)
150+
The average time for the requested disk sector to rotate under the read/write head (equivalent to half a rotation):
151+
$$T_{\text{rotational}} = \frac{1}{2} \times \left(\frac{60}{\text{RPM}}\right) \times 1000\text{ ms}$$
152+
153+
| Spindle Speed (RPM) | Category | Average Rotational Delay |
154+
| :---: | :---: | :---: |
155+
| **5,400 RPM** | Laptop / Power-Saving HDD | **5.56 ms** |
156+
| **7,200 RPM** | Desktop Standard HDD | **4.17 ms** |
157+
| **10,000 RPM** | VelociRaptor High-Performance | **3.00 ms** |
158+
| **15,000 RPM** | Enterprise SAS / Server HDD | **2.00 ms** |
92159

93160
---
94161

95162
## ⌨️ Keyboard Shortcuts
96163

97164
| Shortcut | Action |
98-
| :--- | :--- |
165+
| :---: | :--- |
99166
| <kbd>Space</kbd> | **Play / Pause** animation playback |
100167
| <kbd>←</kbd> | **Previous Step** (Step backward) |
101168
| <kbd>→</kbd> | **Next Step** (Step forward) |
102169
| <kbd>Home</kbd> | **Jump to Start** (Initial head position) |
103170
| <kbd>End</kbd> | **Jump to End** (Complete simulation) |
104171
| <kbd>R</kbd> | **Reset** simulation state |
105172
| <kbd>T</kbd> | **Toggle Theme** (Dark Obsidian ⇄ Light Academic) |
106-
| <kbd>V</kbd> | **Toggle Voice Narration** |
107-
| **Canvas Click** | **Inject I/O Request** at clicked cylinder |
173+
| <kbd>V</kbd> | **Toggle AI Voice Narration** |
174+
| **Canvas Click** | **Inject I/O Request** at clicked cylinder/sector |
108175

109176
---
110177

111178
## 🚀 How to Run Locally
112179

113-
Because the project is built with **Pure Vanilla Web Technologies**, no build tools or npm package installations are required.
180+
Because the project is built with **Pure Vanilla Web Technologies**, zero build tools or npm package installations are required.
114181

115182
### Method 1: Local HTTP Server (Python)
116183
```bash
@@ -119,9 +186,34 @@ python -m http.server 8000
119186
Open **[http://localhost:8000/project.html](http://localhost:8000/project.html)** in your browser.
120187

121188
### Method 2: Direct File Open
122-
Double click `project.html` directly in any web browser.
189+
Double click `project.html` directly in any modern web browser.
190+
191+
---
192+
193+
## 👨‍💻 Developed & Maintained By
194+
195+
<div align="center">
196+
197+
### **PRIYA RANJAN**
198+
*Full-Stack Engineer & Systems Architecture Enthusiast*
199+
200+
[![GitHub](https://img.shields.io/badge/GitHub-Priya--Ranjan--0201-181717?style=for-the-badge&logo=github)](https://github.com/Priya-Ranjan-0201)
201+
[![Repository](https://img.shields.io/badge/Repository-Disk__Scheduling__Algorithm-6366f1?style=for-the-badge&logo=git)](https://github.com/Priya-Ranjan-0201/Disk_Scheduling_Algorithm)
202+
203+
<br/>
204+
205+
**Crafted with ❤️ and precision for Operating Systems education and computer engineering students worldwide.**
206+
207+
</div>
123208

124209
---
125210

126211
## 📜 License
127-
This project is open-source and available under the [MIT License](LICENSE).
212+
213+
This project is licensed under the **MIT License** — see the [LICENSE](LICENSE) file for full details.
214+
215+
---
216+
217+
<div align="center">
218+
<sub>⭐ If you find this project helpful for your Operating Systems studies or coursework, please consider starring the repository!</sub>
219+
</div>

0 commit comments

Comments
 (0)