Q1. why is the address space of a process divided into kernel space and user space? A: the virtual address space of Linux is 4 GB. the kernel divides the 4 GB space into two parts. the larger 1 GB space (the virtual address 0xC0000000 to 0 xFFFFFFFF) is used by the kernel, it is called the kernel space, and the low 3 GB (virtual...
Q1. why is the address space of a process divided into "kernel space" and "user space "?
A: the virtual address space of Linux is 4 GB. the kernel divides the 4 GB space into two parts. the larger 1 GB space (the virtual address 0xC0000000 to 0 xFFFFFFFF) is used by the kernel, it is called "kernel space", and the low 3 GB (virtual address 0x00000000 to 0 xBFFFFFFF) is used by each process, which is called "user space" because each process can enter the kernel through system calls, therefore, the kernel space is shared by all processes in the system. Therefore, from the process perspective, each process can have a 4 GB virtual address space (also called virtual memory ).
Q2. how does Linux implement "request page adjustment?
A:
1) If the Accessed page is not in memory, that is, the page is not stored in any physical page, the kernel allocates a new page and initializes it as appropriate, this technology is called "request page adjustment ";
2) "request paging" is a dynamic memory allocation technology that delays page allocation until it can no longer be postponed. that is to say, this delay occurs until the page to be accessed by the process is not in the physical memory. this technology is introduced mainly because the process does not access all the addresses in its address space when it starts running.
From: Column of zhouzxi