Project 3: Process Scheduler Visualization Tool
A tool that visualizes the Linux scheduler in real-time, showing which processes are running on which CPUs, context switches, runqueue depth, and scheduling decisions.
Quick Reference
| Attribute | Value |
|---|---|
| Primary Language | See main guide |
| Alternative Languages | N/A |
| Difficulty | Level 3: Advanced |
| Time Estimate | 2 weeks |
| Knowledge Area | OS Scheduler / Kernel Internals |
| Tooling | Linux Scheduler (CFS) |
| Prerequisites | C, understanding of basic scheduling concepts |
What You Will Build
A tool that visualizes the Linux scheduler in real-time, showing which processes are running on which CPUs, context switches, runqueue depth, and scheduling decisions.
Why It Matters
This project builds core skills that appear repeatedly in real-world systems and tooling.
Core Challenges
- Reading scheduler data from
/procand tracefs (maps to kernel/user data interfaces) - Understanding CFS vruntime and load balancing (maps to scheduling algorithms)
- Tracking context switches in real-time (maps to process lifecycle, interrupts)
- Correlating CPU time with priority (maps to scheduler internals)
- Visualizing multi-core scheduling (maps to SMP considerations)
Key Concepts
- Completely Fair Scheduler (CFS): “Linux Kernel Development” Ch. 4 - Robert Love
- Process states and transitions: “Operating Systems: Three Easy Pieces” Ch. 4 - Arpaci-Dusseau
- /proc filesystem: “The Linux Programming Interface” Ch. 12 - Michael Kerrisk
- CPU affinity: “The Linux Programming Interface” Ch. 35 - Michael Kerrisk
Real-World Outcome
Deliver a working demo with observable output that proves the feature is correct.
Implementation Guide
- Reproduce the simplest happy-path scenario.
- Build the smallest working version of the core feature.
- Add input validation and error handling.
- Add instrumentation/logging to confirm behavior.
- Refactor into clean modules with tests.
Milestones
- Milestone 1: Minimal working program that runs end-to-end.
- Milestone 2: Correct outputs for typical inputs.
- Milestone 3: Robust handling of edge cases.
- Milestone 4: Clean structure and documented usage.
Validation Checklist
- Output matches the real-world outcome example
- Handles invalid inputs safely
- Provides clear errors and exit codes
- Repeatable results across runs
References
- Main guide:
TRACK_A_OS_KERNEL_PROJECTS.md - “Linux Kernel Development” by Robert Love