The editor is keen to collect and organize resources, and record the process from stepping on the pit to climbing the pit. I hope that I can record what I have learned, the techniques used in actual work, learning methods, experience, and some pitfalls I have stepped on. I also hope that you, who want to be a senior engineer of the Linux kernel, can avoid some detours through my sharing, and can form a set of own methods and apply them in practice.
1. The components of the Linux kernel
1. Understand the basic concepts of the operating system. If not, you can study "Operating System: Design and Implementation", the book written by Andrew S. Tanenbaum, using MINIX as an example to explain the concept of the operating system. Very recommended.
2. With the basic concept of the operating system, you can understand the mechanism of Linux. Recommend Linux Kernel Design and Implementation written by Robert Love. This book conceptually explains what Linux is and how it works. This book should be read repeatedly.
3. With the knowledge of the Linux kernel, we also need to learn the source code of the Linux kernel in detail. The classic is "In-depth Understanding of the Linux Kernel" written by Daniel P. Bovet. When studying this book, look at the kernel code. The book is a bit of a learning curve, so there's a lot of code to dig through. However, if this book is easy to understand, then congratulations, you are already familiar with the Linux kernel.
4. If you want to develop device drivers, you can learn linux device drivers from O'Reilly Press. This book is good material for getting started with driving. There is also a very good textbook, proficient in Linux driver development, you can refer to it. Driving, it is inevitable to learn some hardware protocols and materials. If you are researching which one, you can find the corresponding hardware documentation to understand how the hardware works. I won't go into details on these.
5. For the network part, learn some Linux network part and learn "In-depth Understanding of LINUX Network Technology Insider". This book explains the network part of Linux very clearly and thoroughly. However, we generally do not do research in this area, nor do we need to do so much research. After all, there are very few relevant jobs now.
6. Most of the work related to Linux is concentrated in some embedded development fields, such as arm, mips, etc. You will learn the following information about the architecture to understand the design and working mode of the CPU. Just look at the chip manual corresponding to ARM, which is very detailed. mips Just look at MIPS running, there is a version or two. There are some differences between the two versions, it is recommended to read them all.
7. Add a little experience. Don't think that Linux is difficult to learn because it is huge and complex. If you study hard, you can learn anything. It depends on your perseverance and perseverance. In addition, don't take detours, don't read those books on Linux 0.11 on the market, just learn what you want to learn. Just like learning C language to watch Tan Haoqiang, detours and effort will seriously affect the learning effect.
Regarding the Linux kernel learning route, say a few more words about application programming, sometimes often need:
1. Learn Linux application programming. It is recommended to look at advanced programming in the Unix environment. If you have done all the examples in it, you will have a systematic understanding of the entire Linux programming.
2. For Linux, there is a Linux system programming. After learning the previous one, this one will be clear at a glance. It is mainly for Linux to understand some specific content, which is relatively complete and practical.
3. Linux network programming, systematically study "Unix network programming. Volume 1, socket network api". Basically all programs related to web applications are fine.
Second, how to learn the Linux kernel?
The knowledge of the core is like the knots below, tied one by one. To solve them, we must first find the thread head, which is the function interface in the kernel. At the beginning stage, it is generally not necessary to study the kernel code in depth, just use the interface function of the kernel.
Here's how to learn these kernel functions, like untying a rope:
Before we learn the Linux kernel, we first need to master the following points:
(1) How to learn the kernel, first understand what is the composition of the Linux kernel?
(2) Need to know the organizational structure of the Linux kernel source code (download link)?
(3) What are the key knowledge points that need to be learned?
(6) The most detailed analysis of Intel CPU architecture in the whole network (kernel source code)
(8) QEMU debugging Linux kernel environment construction
(9) Netizens said that the Linux driver is not thorough, so this is the Linux driver
(11) Look at the essence of the underlying socket from the Linux kernel (IO)
(12) Communication between Linux user space and kernel space (Netlink communication mechanism)
(13) Linux kernel memory related issues, this article will give you a thorough understanding
(14) One article to understand the hierarchical structure of the CPU, this article is enough
Two, thematic module learning
2.1 Operating system principle
Linux operating system learning - start
Linux operating system learning - kernel operation
Linux operating system learning - kernel initialization
Operating system principle (1): operating system principle and overview (flow chart)
Operating system principle (2): common commands based on Linux operating system
Operating system principle (3): Linux operating system I/O mechanism principle (detailed flow chart)
Operating system principle (four): memory management RAID disk array and configuration
Principles of Operating System (5): Principles of Disk Cache Mechanism for Memory Management
Principles of Operating System (6): Page, Segment, and Segment Page Storage in Storage Management
Principle of System Operation (7): State and transition of process (five-state model)
Operating system principles (eight): several methods and basic principles of process synchronization
Assembly language basics (1): Basic knowledge of assembly language (graphic code)
Advanced Assembly Language (4): Principle and Implementation of ARM Architecture Processor Mechanism
Advanced assembly language (5): ARM instruction set and assembly language programming
2.2 Memory management topic
What is memory? This article lets you understand how memory is implemented
Essential skills for embedded development, Linux kernel source code organization structure
One article to understand Linux memory management, malloc, free implementation principle
Memory Management Series (2): Summary of Linux Memory Management Principles
Memory Management Series (4): Understanding Memory barrier (memory barrier)
Memory Management Series (5): Principle of LRU Linked List Mechanism for Memory Reclamation
Memory Management Series (6): Principles of Virtual Memory and Physical Memory Mechanism
Memory Management Series (8): Implementation Principle of Malloc Function in C/C++ Development
Memory Management Series (12): Benefits of the user-mode memory memory mapping function Mmap
Memory Management Series (13): Memory Management: Detailed Explanation of Virtual Address Space-MMU
Memory Management Series (14): How does Malloc/free in C language allocate memory
Memory Management Series (Seventeen): How Much Memory Does a Linux Application Consume?
Memory management series (eighteen): virtual address to physical address, when to start mapping
Memory Management Series (22): Hanging Byte Interviewer, CPU Cache Consistency Protocol MESI
Memory Management Series (27): This article lets you know about Linux-based processor cache
Memory Management Series (28): Spinlock: Deadlock Mechanism in Linux Kernel
Memory Management Series (29): Memory Management: Deep Understanding of ARMv8 Exception Handling
Memory Management Series (Thirty): Von Neumann: Some Thoughts on Memory
Memory Management Series (34): Read and understand the usage of select, poll, epoll in one article
2.3 Process management topic
Process Management Series (6): Analysis of Linux Process Priority (Code Demonstration)
Process Management Series (10): Creation and Derivation of Processes and Threads in the Linux Kernel
Process Management Series (11): There are several process states based on Linux
Process Management Series (12): Several CPU Scheduling Strategies of the Operating System
Process Management Series (12): Scheduling and Process Switching of Linux Process Management
Process Management Series (14): Super-detailed Socket Communication Principles and Examples
Process Management Series (15): This is a very complete IO basic knowledge and concepts
Process Management Series (18): From process to thread - task_struct structure analysis in Linux
Process Management Series (19): Do you really understand the Linux interrupt mechanism?
2.4 Network protocol stack topics
Interesting talk about network protocol stack (1): socket buffer principle
Interesting talk about the network protocol stack (2): how the data packet is processed
Interesting talk about the network protocol stack (4): the structure of the transmitted Arp message
Interesting talk about network protocol stack (eight): the process of socket sending network data
2.5 Device Driver Topics
Talking about device drivers (1): Detailed explanation of operating system I/O process
Talking about device drivers (2): Character devices for Linux operating system learning
2.6 File system
Understanding the file system (3): Linux kernel startup and file system loading process
Understanding the file system (4): illustrations | virtual network cards commonly used in Linux
2.7 Performance optimization
Performance tool use (1): Linux performance tool ftrace use
Use of performance tools (2): Linux performance tool ftrace basics
Performance tool use (4): Linux performance tool ftrace framework
Performance Optimization (1): A Panoramic Guide to Linux Performance Optimization
Performance optimization (2): Talking about the real-time optimization of the Linux kernel
2.8 Interview questions/experience
Talk about the learning route of the Linux kernel, how to learn specifically?
Embedded development wants to enter a major Internet company in 2022. Are you skilled?
Embedded Linux kernel learning experience summary, an article for you to master the method
Embedded software interviews, the key points and difficulties are all covered
2.9 Kernel Books
- "In-depth understanding of the Linux kernel"
- "This is how Linux should be learned"
- "Linux Kernel Complete Notes V3.0 Bookmark Edition"
- "Linux Command Line Encyclopedia - Shotts (william E.shotts)"
- "Linux Command Quick Reference Manual"
- "Linux Performance Optimization Master"
- "Linux Environment Programming: From Application to Kernel"
- "Linux cluster and automated operation and maintenance Yu Hongchun"
- "Linux Driver Development Example (Second Edition)"
- "Linux Advanced Programming (3rd Edition)"
- "Building Highly Available Linux Servers (4th Edition)"
2.10 Embedded Knowledge
Basic knowledge for beginners (2): After using Linux for so long, I only know these concepts
Basic knowledge for beginners (3): Understand in one article | The ins and outs of Linux drivers
Basic knowledge for beginners (5): seven steps recommended for embedded Linux learning route
Three, kernel learning route
Here I recommend the exclusive [Linux Kernel Source Code] course system of ZeroSound Education. Through 20 project cases and 2W+ lines of handwritten code, it comprehensively analyzes 6 kernel technology directions.
Systematically and comprehensively explain the underlying principles and development technologies in all aspects:
The learning route mainly starts from
- Process Management Topics
- Memory Management Topics
- Network Protocol Stack Topics
- Device Driver Topics
- Kernel Component Topics
- File System Topics
- Kernel project practical topics
and so on. . .
These contents, if you plan to learn step by step in a few years, you will become a Linux master. It is recommended that individuals participate in the training of Zero Sound Education, and the learning efficiency will be much higher. Purposeful participation in training, shortening the cycle, and rapid prototyping are the needs of the times.
Free information through train : the latest Linux kernel source code information document + video information
Kernel learning address : Linux kernel source code/memory tuning/file system/process management/device driver/network protocol stack