If you want an even fuller OS for teaching purposes, early versions of Minix were designed with teaching in mind, and there’s a book to go along with it.
Yeah, but they used a much more confusing architecture for early Minix (16-bit protected mode) that I'm of the opinion it obfuscates a lot of the underlying concepts.
And xv6 has a book that goes along with it as well.
And xv6 has a book that goes along with it as well.