user space vs kernel space address space

parmenides mobile.parmenides at gmail.com
Tue Jan 7 13:56:37 EST 2014


>         But all physical memory/frames are eventually controlled by
>         kernel , then how can there ever exist a frame which doesn't
>         have mapping with kernel or kernel virtual address ?

The key point is that frames are in physical memory while pages are in 
virtual memory. For a 4G Linux system, low 896M physical memory (low 
memory) is mapped directly into kernel space(virtual), and the rest is 
high memory at all (initally not mapped into any virtual space).

If kernel needs more frames other than those directly mapped, it can map 
frames from high memory into its 128M virtaul space.

If a user task needs frames, these frames might be from low memory or 
from high memory. In the former case, kernel shares these frames with 
user task. While in the latter case, these frames are only used by the 
user task.

Therefore, some frames in high memory might not be mapped into kernel 
space at all.

In addition, 896M low memory(physical) can be used directly by kernel, 
while all physical memory frames are allocated and mapped by kernel.



More information about the Kernelnewbies mailing list