A Linux kernel I/O scheduler that dynamically switches between FIFO, SSTF, and BATCH scheduling algorithms at runtime based on real-time seek-variance telemetry. Includes a full observability stack: kernel tracepoints → WebSocket bridge → live dashboard.
┌──────────────────────────────────────────────────────────────────┐
│ kernel/ddso.c (Linux block-layer elevator module) │
│ ┌──────────┐ ┌───────────────┐ ┌──────────────────────┐ │
│ │ FIFO │◄──►│ Decision │◄──►│ Variance Engine │ │
│ │ SSTF │ │ Engine │ │ (seek_total, │ │
│ │ BATCH │ │ (hysteresis + │ │ seek_sq_total, │ │
│ │ │ │ cooldown) │ │ sample_count) │ │
│ └──────────┘ └───────────────┘ └──────────────────────┘ │
│ ▲ │ │
│ │ trace_ddso_switch() │ │
│ │ trace_ddso_dispatch() ▼ │
│ └─────────── /sys/kernel/tracing/trace_pipe ─────────────┘
│ │
├──────────────────────────────┼───────────────────────────────────┤
│ backend/ │ (Node.js WebSocket bridge) │
│ server.mjs ▼ │
│ ┌──────────────────────────────────────────────┐ │
│ │ Reads trace_pipe via WSL │ │
│ │ Parses ddso_switch + ddso_dispatch events │ │
│ │ Broadcasts sampled telemetry over WebSocket │ │
│ └──────────────────────────────────────────────┘ │
│ │ │
├──────────────────────────────┼───────────────────────────────────┤
│ frontend/ ▼ (Next.js + React dashboard) │
│ ┌──────────────────────────────────────────────┐ │
│ │ AlgorithmIndicator — live algo display │ │
│ │ RealTimeGraph — variance + depth charts │ │
│ │ TraceStream — raw event log │ │
│ │ WorkloadControl — fio trigger buttons │ │
│ └──────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────┘
| Directory | Description |
|---|---|
kernel/ |
Linux kernel module (ddso.c, ddso_trace.h, Makefile/Kbuild) |
backend/ |
Node.js WebSocket server bridging kernel traces to the browser |
frontend/ |
Next.js dashboard with real-time visualization components |
scripts/ |
Workload configs, device setup, and startup scripts |
docs/ |
Architecture, decision engine, and validation documentation |
artifacts/ |
Verified trace outputs and validation evidence |
The scheduler uses seek-variance to determine the optimal algorithm:
| Condition | Selected Algorithm |
|---|---|
variance < (1 << 13) |
FIFO (sequential) |
variance > (1 << 17) |
SSTF (seek-optimal) |
queued >= 8 && variance > (1<<16) |
BATCH (throughput) |
Anti-thrashing safeguards:
- Hysteresis:
stable_counter >= 16consecutive samples before switching - Cooldown: Minimum 50ms between algorithm transitions
- Sample window: 256-sample exponential decay for variance calculation
- WSL2 with a custom kernel (or any Linux with kernel headers)
- Node.js 18+
fio,trace-cmdinstalled in WSL
cd kernel/
make KDIR=/path/to/kernel/build
sudo insmod ddso.ko
echo ddso | sudo tee /sys/block/loop0/queue/schedulercd backend/
node server.mjscd frontend/
npm install
npm run dev
# Open http://localhost:3000| Role | GitHub | Scope |
|---|---|---|
| Primary Owner | @Rexy-5097 | Kernel module, decision engine, architecture |
| Collaborator | @AkankshuGuleria | Frontend dashboard, visualization, scripts |
Licensed under the GNU General Public License v2.0.