The Linux kernel can be logically divided into five parts:
1. Process scheduling
Process scheduling controls CPU access by processes. When it is time to select the next process to run, the scheduler selects the program most worthy of running. Runnable processes are actually processes that are only waiting for CPU resources. If a process is waiting for other resources, it is a non-runnable process. Linux uses a priority-based process scheduling algorithm to select new running processes.
2. Interprocess communication
Intra-process Communication (IPC) includes FIFO, pipe, SHM, MSG and SEMaphore of System V IPC.
3. Memory management
Memory management allows multiple processes to safely share a main memory area. Linux’s memory management supports virtual memory, which is a program running on a computer whose total code, data, and stack can exceed the size of the actual memory. The operating system just keeps the currently used program blocks in memory and the rest on disk. The operating system is responsible for swapping blocks between disk and memory when necessary. Memory management is logically divided into hardware independent parts and hardware dependent parts. The hardware independent part provides process mapping and logical memory swapping. The hardware related section provides a virtual interface to the memory management hardware.
4. Virtual file systems
Virtual File systems hide the details of various hardware and provide a unified interface for all devices, and VFS provides dozens of different File systems. Virtual file systems can be divided into logical file systems and device drivers. Logical file systems refer to the file systems supported by Linux. Device drivers refer to the device driver modules written for each hardware controller.
5, the network
Linux is an operating system derived from the network. It provides a large number of built-in network functions, and network functions are closely related to the kernel. The networking capabilities of Linux include various network protocols and access to network hardware.