Regarding virtual address space of the kernel...

Naman shekhar Mishra namanshekharmishra2 at
Fri Jun 17 04:34:33 EDT 2011

I've been trying to understand this for a while with little success so any help would be hugely appreciated...

Suppose I have 512 MB of physical RAM available in the system. The top 1 GB part of the 4 GB virtual address space maps *directly* starting from the 0 physical address (mapped by kernel). (Question 1) **Doesn't that mean that the physical RAM is not enough to support this  mapping (I mean, only 512 MB will be directly mapped be the kernel. Moreover, no physical space will be left for user space mapping)? And even if I have 1 GB of physical RAM installed, where would all the processes get mapping from since this this 1 GB will be mapped in the address space of the kernel? **

I read in a book:
"The address space after PAGE OFFSET is reserved for the kernel and
this is where the complete physical memory is mapped (eg. if a system
has 64mb of RAM, it is mapped from PAGE OFFSET to PAGE OFFSET
+ 64mb)."
(Question 2, somewhat related to Q1)**Does this mean that no physical memory is left to be mapped by user space virtual memory (i.e. if all physical memory is mapped by address above PAGE_OFFSET, what is mapped by address below PAGE_OFFSET)?**

(Question 3)**Also, why can't all memory, (PAGE_OFFSET to PAGE_OFFSET + 1 GB) be mapped to this 64 MB. After all pages can be swapped out and new pages can be brought in. 

(Question 4)**Also, when we say that kernel can map 896 MB (ZONE_NORMAL), does this 896 MB refer to virtual space or physical space?**
Little (ok, very) confused so kindly explain...  Thank you. 
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Kernelnewbies mailing list