Lottery scheduling implementation in xv6 kernel. how schedulers actually work, as well as how a context switch takes place. A small addendum is to also require students to figure out how to make processes return a proper error code when exiting, and to be able to access that error code through the wait() system call.