Linux systems can be divided into two parts, including user space and kernel space.
Modern CPUs typically implement different modes of operation, and arm, for example, achieves 7 modes of operation:
User mode, fast interrupt, external interrupt, administrative mode, data access abort, System mode, undefined instruction exception.
X86 also implements 4 different levels: Under RING0~RING3.RING0, you can execute privileged commands, or you can access IO devices.
There are many limitations in Ring3. The Linux system uses this feature of the CPU, using the two levels to run the Linux kernel and application separately.
Kernel space and user space are two different states of program execution, which can transfer from user space to kernel space through system call and hardware interrupt .
Linux kernel architecture
which
SCI System Call Interface: Provides a set of standard system call functions for user space to access the Linux kernel, and sets up a bridge between user space and kernel system.
PM: Process management, creating processes, stopping processes. and control the communication between them. Process management also includes controlling how the active process shares the CPU, which is process scheduling.
MM: Memory Management: control multiple processes to share memory areas securely.
Arch: Architecture-related code.
NS: Network protocol stack
VFS:VFS ( virtual file system ) hides the specifics of various file systems, providing a unified interface for file operations.
DD: Device driver
Linux Kernel Introduction