(os: project 1): implement round robin.

Also some bug fixes.