LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-04-2010, 07:35 AM   #1
shreshtha
LQ Newbie
 
Registered: Jul 2006
Location: India
Distribution: ubuntu
Posts: 13

Rep: Reputation: 0
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?
 
Old 01-04-2010, 08:39 AM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by shreshtha View Post
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.
 
1 members found this post helpful.
Old 01-14-2010, 09:59 AM   #3
shreshtha
LQ Newbie
 
Registered: Jul 2006
Location: India
Distribution: ubuntu
Posts: 13

Original Poster
Rep: Reputation: 0
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
 
  


Reply

Tags
kernel, memory management


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Do we have any chance of calling user space callback function from kernel space? ravishankar.g Linux - Newbie 1 09-22-2009 07:14 PM
how to call socket prog code written in user space from kernel space???HELP kurt2 Programming 2 07-15-2009 09:56 PM
Sharing Memory between driver space and user space ian b davidson Programming 1 11-10-2008 06:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration