LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Division of Logical Memory Space in to User Space and Kernel Space (http://www.linuxquestions.org/questions/linux-newbie-8/division-of-logical-memory-space-in-to-user-space-and-kernel-space-779716/)

shreshtha 01-04-2010 07:35 AM

Division of Logical Memory Space in to User Space and Kernel Space
 
Logical Memory Space of 4GB is divided in to 3GB User Space and 1GB Kernel Space. Always. Correct?

1. How can we change it? (just changing value of PAGE_OFFSET is okay?)
2. If system have only 256MB of memory (embedded system) and suppose Kernel Modules eat away all the memory during boot. User space will be left will no memory. Is this case possible?

johnsfine 01-04-2010 08:39 AM

Quote:

Originally Posted by shreshtha (Post 3813531)
Logical Memory Space of 4GB is divided in to 3GB User Space and 1GB Kernel Space. Always. Correct?

Not always. 3GB/1GB is the usual split for virtual address space, but it can be configured at kernel build time.

Quote:

1. How can we change it? (just changing value of PAGE_OFFSET is okay?)
I don't remember how you configure it. What you just said might be right.

Quote:

2. If system have only 256MB of memory (embedded system) and suppose Kernel Modules eat away all the memory during boot. User space will be left will no memory. Is this case possible?
You seem to be confusing virtual address space with physical memory.

Adjusting the split of virtual address space should have no noticeable impact on an embedded system with 256MB of physical ram.

You probably want to recompile the kernel with carefully chosen options to tune it for your embedded system and to minimize the amount of memory (not address space) used by the kernel. But that 3GB/1GB split should not matter. There should be no reason to change it.

There is an option, usually enabled, (I forget the name) that allows a 32 bit kernel to support physical ram larger than 896MB. If you are building a kernel that never needs to support more than 896MB of ram, you can make the kernel a little smaller and a tiny bit faster by not enabling support for over 896MB of physical ram.

shreshtha 01-14-2010 09:59 AM

Thanks a lot johnsfine. Yes I was confused with Physical memory and Virtual memory. Getting more details about the topic Virtual Memory from Linux Kernel Internal helped a lot.
Thanks again for your time and response.
--Shreshtha


All times are GMT -5. The time now is 12:08 AM.