1. When asked about the Linux architecture (which is how the Linux system is structured), we can refer to the answer: in large terms, the Linux architecture can be divided into two pieces:
(1 User Space: User space is also included in the user's application, C Library
(2 kernel space: Kernel space includes, system call, kernel, and platform architecture-related code
2. The reasons for the Linux architecture to be partitioned into user space and kernel space:
1) Modern CPUs often implement different modes of operation,
Arm as an example: ARM implemented 7 modes of operation, the CPU can be executed in different modes of instruction or access to different registers:
(1) User mode USR (2) system mode SYS (3) Management Mode SVC (4) Fast Interrupt Fiq (5) external interrupt IRQ (6) Data access termination abt (7) Undefined instruction exception with (2) X86 as an example : X86 achieves 4 different levels of permissions, Ring0-ring3; RING0 can execute the privileged instruction, can access the IO device; Ring3 has a lot of limitations.
2) So, Linux from the perspective of the CPU, in order to protect the security of the kernel, the system is divided into 2 parts;
3. User space and kernel space are two different states of program execution, and we can complete the transfer of user space to kernel space through "system call" and "Hardware Interrupt".
4. Linux kernel Architecture (note distinction between Linux architecture and Linux kernel architecture)
Linux architecture and kernel structure diagram