Introduction
Read this book on https://nskernel.gitbook.io/kernel-play-guide/.
Why I write this book
This book is created because RTFSC is hard and RTFM is merely impossible for Linux due to the lack of true manuals. For years, millions of CS students go into the System and Networking area, and most of them finally decide to go for the network. They are afraid of the Linux Kernel. When they face a million-lines-of-code project they don't know what to do. They know it in concept but when it just comes to the exact detail - the detail that is poorly documented - like adding a flag to a process's metadata, things would go totally frustrating because they simply don't know where to start. Most of the documentations of the Kernel are generated by tools and if you want to find a book it is usually too massive to even start reading. Luckily, if you RTFSC, things could be done. Just with some pain in the ass.
As a CS student doing system research, I totally understand that feeling. I have read the code so I hope you don't need to do it again. Or at least not from scratch. I hope once you have the concept and the idea of what you want to do, you can find a way to achieve your goal here.
About this book
This book is NOT A DOCUMENTATION, and is NOT AN INTRODUCTION TO THE LINUX KERNEL. It functions as a manual, a what-to-do, instead of a how-it-works. It covers from the most fundamental things like where to find the kernel source code and how to build a custom kernel, all the way to the structures and flows in the kernel.
Some technologies outside the Linux Kernel will be introduced as how-it-works, however, but those are written for better understanding of what-to-do in the kernel instead of and introduction.
Should you read it
GEEK OUT. If you do not know what EXACTLY you want to find in this book then you should probably not read it. If you want to know how Linux works or even just want to learn some OS basics, then you should seek for something else. Like Apple says in their documentations of the Darwin Kernel (macOS's kernel), there are many good introductory operating systems texts, this is not one of them.
To read this book I assume you have a decent knowledge of x86-64 assembly, C language and operating systems, probably a little bit of compiler as well.
How will I write this book
I will update this book after I run into something and solve it later. It's like a blog, but more organized.
Last updated