Add os/round-robin: Round Robin scheduler in C++ and C with Gantt chart, quantum sweep and captured output

This commit is contained in:
ankurm
2026-11-26 00:42:10 +05:30
parent f784f9b6ee
commit 9ed8479cec
24 changed files with 513 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
# Round Robin scheduling (C++ and C)
Companion code for [Round Robin Scheduling in C and C++](https://ankurm.com/implementing-round-robin-scheduling-algorithm-in-c/).
The full explanation, dry run and viva questions live in that post.
scripts/run-all.sh # builds rr.cpp, rr.c and the legacy program, regenerates output/
* `rr.cpp` / `rr.c` — same algorithm, same output; input is `n`, then `arrival burst` per process, then the quantum
* `legacy/old_rr_tick_loop.cpp` — the earlier tick-loop version, kept as published (correct only when every arrival is 0)
* `input/` — sample workloads, `output/` — captured results quoted in the post