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...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help