Adding Stride Scheduling to Xv6
nickchandler.dev·22h·

The xv6 kernel uses a basic round robin scheduler. To understand scheduling more deeply, I replaced it with a stride scheduler. This post compares round robin and stride scheduling, explains how I added it to xv6, and what I learned along the way.

TL;DR / Key Takeaways Link to heading

  • xv6 uses a simple round robin scheduler that treats all runnable processes equally.
  • I replaced it with a stride scheduler to explore proportional-share scheduling.
  • Stride scheduling assigns each process a “stride” value that determines how often it runs; smaller strides mean higher priority.
  • In a few lines of code, I was able to achieve stride scheduling effectiveness on par with the theoretical expectations.
  • Along the way, I uncovered an interesting startup lock…

Similar Posts

Loading similar posts...