Home > Article > Operation and Maintenance > How to learn the linux kernel
Regarding kernel learning, I suggest not to read the kernel but to understand the composition and characteristics of the kernel first, and then find questions through thinking before reading the kernel source code. That is, first understand the overview and then read the local details.
And the kernel is divided into many parts. Don’t just read them in order. You should focus on a certain part such as memory management or process management. Read a few books horizontally so that you can have a comprehensive understanding.
Linux Kernel Sikuquanshu (Recommended learning: linux operation and maintenance)
1. "Linux Kernel Design and Implementation》
This book focuses on principles. The best book for getting started. The author is the person who added preemption to the 2.6 kernel. He is very proficient in the scheduling part, and scheduling is the core of the entire system, so this book is very authoritative.
2. "In-depth Understanding of the Linux Kernel"
This book has more details than the previous one. It is the first choice for Linux kernel hackers when recommending books. The writing is relatively simple and easy to understand, suitable for those who are new to the LINUX kernel.
This book has many diagrams and vividly gives the definition of key data structures. Compared with "Linux Kernel Source Code Scenario Analysis", the content of this book is compact, and the explanation of a single question will not take hundreds of pages. The outline is useful, but the depth is inferior to "Linux Kernel Source Code Scenario Analysis".
3. "LINUX Device Driver (3rd Edition)"
This book emphasizes hands-on practice! But it explains "device driver", not the core thing, and some things cannot be practiced without hardware. It may be more suitable for programmers who develop drivers. The parts about synchronization, mutual exclusion, and memory allocation are very good. .
4. "Linux Kernel Source Code Scenario Analysis"
is a very good book, very classic. It was written by Professor Mao Decao of Zhejiang University. Unfortunately, it has not been published since 2001. renew. Divided into two volumes.
Many explanations are based on the 2.4 kernel and need to be noted. If you want to study, it is also recommended to study 2.6. There have been many significant improvements in 2.6 compared to 2.4, so you should study it.
The content of the book is broad and profound, not very easy to understand, but the details are described clearly. But I feel that the overall feeling of the core is not strong enough. In addition, there is a lack of analysis of the network part. I don’t think it’s very suitable for beginners.
The first volume explains memory management, interrupts, exceptions and system calls, process control, file systems and traditional Unix IPC; the second volume explains sockets, device drivers, SMP and booting.
This book is based on the Intel IA32 system. Due to its large thickness, a lot of system knowledge is explained incidentally. Therefore, if you want to have an in-depth understanding of the working mechanism of the kernel but are not very familiar with the system structure of Intel CPU, this book is the most suitable.
The above is the detailed content of How to learn the linux kernel. For more information, please follow other related articles on the PHP Chinese website!