The situation
The teaching-OS group (volunteer maintainers, GitHub-based contribution flow) prioritizes patches that are well-documented and pedagogically clear over patches that are merely clever.
Your task
Implement and benchmark a Multi-Level Feedback Queue scheduler in the xv6 teaching kernel so students see real interactivity tradeoffs.
The brief
What you do
- Fork the xv6-riscv repository and implement MLFQ in proc.c with 3 priority queues, per-queue time slices (10ms / 20ms / 40ms), priority demotion on slice exhaustion, and a 100ms priority boost to prevent starvation.
- Add a sysinfo-style system call exposing per-process queue + runtime stats.
- Write 3 benchmarks: CPU-bound vs I/O-bound mix, interactive-typing simulation, and starvation regression.
You deliver
The git patch, benchmark scripts, and a 6-page report covering design choices, results, and a section honestly listing what your implementation does NOT handle.
What you will practice
- Implement preemptive, priority-based scheduling in a real kernel
- Reason about CPU-bound vs I/O-bound workload tradeoffs
- Use kernel data structures (proc table, run queues) safely under context switches
- Design benchmarks that isolate the variable you're actually measuring
A suggested way in
- Read the original MLFQ chapter in OSTEP before touching code — it covers the gotchas
- Priority boosting prevents starvation but breaks if your boost interval is too long
- Benchmark on a single-CPU QEMU instance first; multi-CPU adds locking concerns
Skills you will practice
Operating systems, Scheduling, C programming, Kernel development, Benchmarking, Systems programming
How it is assessed
- Correctness35%
Patch boots cleanly, survives stress tests, and preserves existing xv6 semantics.
- Benchmark design25%
Benchmarks isolate scheduler behavior from I/O and disk effects.
- Code quality20%
Follows xv6 conventions; locking is correct and minimal.
- Report honesty20%
Report names what the implementation does NOT handle (e.g. multi-core).
Resources
- GitTool
Fork xv6-riscv and produce a reviewable patch series.
- QEMUTool
Run xv6 under emulation for safe kernel testing.
- MakeTool
xv6 build system; required for kernel compilation.
- PythonTool
Benchmark harness and result aggregation.
- NotionTool
Author the 6-page design report.
- MarkdownTool
Patch documentation in the project's contributing style.
Finish it. Earn this.
A verified certificate with your name. Anyone can check it.
Time to practice.
Solve this challengeMore like this.
- Software EngineerReverse-Engineer a Stripped Binary to Restore Linking Symbols
- Software EngineerImplement a Distance-Vector Routing Algorithm
- AI EngineerEnd-to-End Lane Following on a Donkeycar Platform
- NLP EngineerLLM-Powered FAQ Chatbot for 40-Person SaaS Scale-up
-
Reverse-Engineer a Stripped Binary to Restore Linking Symbols Software Engineer Receive the stripped shared object (Linux ELF, x86-64, ~280KB), a crash dump with 12 frames of indecipherable addresses, and 4 years of partial git hi reverse engineeringlinking and loadingmachine code Open challenge → -
Implement a Distance-Vector Routing Algorithm Software Engineer Implement distance-vector routing in Python: each simulated router maintains a distance vector, exchanges vectors with neighbors every 1 second of sim routingdistance vectornetwork simulation Open challenge → -
End-to-End Lane Following on a Donkeycar Platform AI Engineer Use the public Donkeycar Tub dataset (or collect about 30 minutes of driving on the simulator). Train a CNN-policy baseline (the Donkeycar default arc end to end learningimitation learningpytorch Open challenge → -
LLM-Powered FAQ Chatbot for 40-Person SaaS Scale-up NLP Engineer You have access to TaskFlow's internal documentation, help articles, and a sample of 500 support tickets. Your task is to build a retrieval-augmented llmraginformation retrieval Open challenge →