LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-26-2010, 10:31 PM   #1
bvramesh
LQ Newbie
 
Registered: Jan 2010
Posts: 5

Rep: Reputation: 0
Question 64-bit Linux OS and 32-bit application


Hi,

If we have 64-bit Linux OS and 32-bit application running on a board which has 30 GB RAM, it is for sure that the OS can access the whole 30 GB RAM. But, the question is can the 32-bit application access the whole 30 GB RAM or only 4 GB of RAM? I guess only 4 GB. Could any one of you have a quick answer and the theory behind the answer?

Thanks & Regards,
Ramesh.
 
Old 01-26-2010, 11:28 PM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
You guessed it.

As far as the 32-bit application is concerned, it's running on a 32-bit machine with a 32-bit address space. End of story
 
Old 01-27-2010, 07:44 AM   #3
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,046

Rep: Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100
Quote:
Originally Posted by bvramesh View Post
But, the question is can the 32-bit application access the whole 30 GB RAM or only 4 GB of RAM? I guess only 4 GB.
A 32 bit application can use any 4GB out of the 30GB that the kernel happens to give it.

I wasn't sure what your question meant. For example, the 32 bit application is not limited to running in the first 4GB of physical memory.

Each 32 bit process in a 64 bit OS is limited to 4GB of virtual address space. You could run the same 32 bit program simultaneously in 8 different processes and use up to a total of 32GB of virtual memory. But any one of them is limited to 4GB.

There are tricks with remapping shared memory segments by which some (but very few) 32 bit programs make effective use of more than 4GB physical memory to operate on more than 4GB of in-memory data in a single process. But generally if you want to operate on more than 4GB of data in memory, you want to compile for 64 bit mode.

Quote:
Originally Posted by paulsm4 View Post
As far as the 32-bit application is concerned, it's running on a 32-bit machine with a 32-bit address space. End of story
It isn't that bad nor that simple. The 32 bit application may have just 32 bit virtual address space, but that still gives it more than it would have "running on a 32-bit machine". For example: Since the kernel is 64 bit, the kernel can have the entire process address space mapped when servicing that process without that requirement reducing the process address size. So 32 bit user mode gets a full 4GB in a 64 bit OS but only 3GB in a typical 32 bit Linux.

Last edited by johnsfine; 01-27-2010 at 07:50 AM.
 
  


Reply

Tags
32bit, application, linux


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
cannot compile 32-bit application on 64-bit ubuntu 9.04 maxreason Ubuntu 5 06-06-2009 10:28 PM
32 bit Application on 64 bit Linux OS -- Memory Usage saleem_ak Linux - Newbie 3 04-01-2009 02:59 PM
compiling 32 bit application on 64 bit linux(x86_64) uttam_h Linux - Software 16 07-19-2008 02:33 PM
porting of 32 bit application on 64 bit linux architecture vikaschoudhry1985 Linux - Newbie 2 07-13-2008 10:39 PM
64-bit or 32-bit Application on 64-bit Linux jjana123 Linux - General 4 05-06-2008 05:27 PM


All times are GMT -5. The time now is 04:40 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration