xv is, without no doubt, my favourite educational OS. It provides both kernel space and userspace. You can find many people extending various aspects of it (memory management, file system, etc) on Github.<p>I still tinker with the x86 version (which isn't maintained anymore):
<a href="https://github.com/mit-pdos/xv6-public">https://github.com/mit-pdos/xv6-public</a>. Doesn't need much effort to build it on macOS.<p>The codebase is pretty compact that it can be understood in a few days, and also rebuilding it is very quick. Can't say the same thing about Linux, but hey as real world OS, guess some complexities are simply unavoidable.