I want to understand how computers work at a deeper level. With enough time, courses, and textbooks, could one person read through the complete source code of an operating system and understand how all of its parts work together? I currently have a bachelor's degree in computer science. What would be the most effective way to approach this—studying an existing system, reading documentation, or building a small operating system myself?
5 Answers
Technically, yes—but large operating systems contain millions of lines of code, including drivers, architecture-specific code, filesystems, networking, and compatibility layers. You could spend years or decades reading it, and you still wouldn’t retain every detail. A more realistic goal is to understand the architecture and become capable of investigating unfamiliar parts when needed.
Building a small hobby operating system is probably the most practical route. Even a simple command-line system can teach you how booting works, how interrupts are handled, how memory is managed, how processes are scheduled, and how system calls are implemented. After that, exploring a larger kernel becomes much less mysterious. You can then focus on specific components instead of trying to consume the entire codebase at once.
That makes sense. It sounds more useful to understand the core concepts in a small system and then use those concepts to explore larger kernels.
Reading source code alone is not usually the best way to learn. Use documentation and architecture diagrams to build the high-level picture, then trace actual programs with tools such as system-call tracers and debuggers. Writing programs that use files, processes, networking, and graphics will also show you how applications interact with the operating system.
Start with a smaller system. A teaching operating system or a small real-time OS is much more manageable than a modern desktop operating system. Studying topics such as user mode versus kernel mode, system calls, interrupts, virtual memory, scheduling, and filesystems will give you a useful foundation without overwhelming you.
Think of a large operating system like a city. You don’t need to memorize every street to understand how to get around; you need to know the major areas, how they connect, and where to look for specific things. Learn the major modules and their interfaces first, then study individual areas in depth.

So the goal would be to learn how to navigate the codebase and understand a new component when I need to, rather than memorize everything?