简体   繁体   中英

Is the kernel's physical memory mapping the same between all virtual address spaces?

On boot, I understand the the kernel is loaded into main memory. When we spawn processes, a portion of the virtual address space is reserved for the kernel. If every processes' virtual address space contains a mapping to the kernel, and the virtual address space for the kernel in each process is always the same: Does this mean every process/virtual address space maps to the same parts of main memory where the kernel resides? This also means the system call interface is available to all processes, and that initiates the "switch" from user space to kernel space? And once we're in kernel space, the process has permissions to touch the protected parts of main memory where the kernel is loaded?

It wouldn't make sense to load the kernel multiple times in main memory as it would be expensive, but shared data structures would be terribly difficult to coordinate.

kernel space is constantly present and maps the same physical memory in all processes. Check these similar discussions:

Linux Kernel logical address for multiple processes

Why is kernel mapped to the same address space as processes?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM