Can PC use more than 4GB of RAM in 32-bit OS?

944turbocup

Junior Member
Mar 13, 2008
3
0
0
Do you know if there is any theoretical benefit, however small, to loading more than 4GB of RAM in a PC that runs 32bit OS? If so, how is it being used by the 32bit OS?

I understand that 32-bit operating system can only address ~3.2GByte of RAM, i.e., 2x2GB or 4x1GB is the most memory ever needed for 32-bit applications. Others say that even 32bit OS can use more than 4GB memory to speed up paging, running virtual machines, creating an HDD buffer, etc. Any advice/thoughts would be very helpful for my research.

Thanks!

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Wow, has it been a week already?

Do you know if there is any theoretical benefit, however small, to loading more than 4GB of RAM in a PC that runs 32bit OS? If so, how is it being used by the 32bit OS?

Yes, you get the normal benefits from having more memory.

I understand that 32-bit operating system can only address ~3.2GByte of RAM, i.e., 2x2GB or 4x1GB is the most memory ever needed for 32-bit applications.

Then you misunderstand. A non-crippled 32-bit OS can address up to 64G of physical memory with PAE. How do you think 32-bit Windows Server, Linux, FreeBSD, etc all do it?
 

pallejr

Senior member
Apr 8, 2007
216
0
0
Come on now, Nothinman, I know you're happy when you get the chance once a week to answer this question :)
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Actually what's even more sad than the fact that the question comes up almost weekly is that I haven't taken 2 minutes to save a boilerplate response to just paste into all of these threads. :/
 

n7

Elite Member
Jan 4, 2004
21,281
4
81
Nothinman, you have the expertise to explain this question far better than most of us could dream to understand.

If you can make up a thread with perhaps a simple explanation as well as the more detailed version explaining the fun stuff that occurs with consumer level (& higher if you'd like) 32-bit OSes & more RAM, i'll see what i can do to get it stickied :)

Actually, you can go as techinically beyond my head as you'd like as long as there's a basic explanation for us dummies somewhere in there ;)
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I thought someone already tried writing a stickey and it got ignored like all of the rest of them?
 

944turbocup

Junior Member
Mar 13, 2008
3
0
0

Thanks Nothingman. I feel your pain, as my search back in time revealed long threads, but no complete answers on the subject. How about humoring us, simple mortals, with more than a one-liner or a textbook reference and explaining how 32-bit OS/applications go around 2^32 physical address constraint and what 32-bit OS features/apps actually use physical address extensions?

Are there any benchmark tests available that show incremental performance gains from increasing RAM loading above 4GB in a 32-bit environment? How significant are these gains and how they come about?

Cheers,

944turbocup

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
How about humoring us, simple mortals, with more than a one-liner or a textbook reference and explaining how 32-bit OS/applications go around 2^32 physical address constraint and what 32-bit OS features/apps actually use physical address extensions?

PAE just enables another level of page tables that extend the physical addresses from 32 to 36 bits so the OS can directly address physical memory up to 64G. But it doesn't affect userland processes at all. Userland processes are still limited to 32-bit addresses so that's 4G total with 2G reserved by the NT kernel and 1G reserved by the Linux kernel. This means that userland processes get 2G of VM in Windows and 3G in Linux by default, 3G is possible in Windows but you have to jump through some hoops. And even 4G is possible in Linux but it hurts performance more than it helps.

So even with PAE enabled each process will still be limited in how much VM it can use. Now there are ways around even that, for example AWE is an API for Windows that lets processes shift around "windows" of memory so that they can make use of more than 2G of VM, but very few processes make use of them or will ever need to worry about running out of VM.

Are there any benchmark tests available that show incremental performance gains from increasing RAM loading above 4GB in a 32-bit environment? How significant are these gains and how they come about?

Well the kernel can directly address all of it so file caching will benefit and since userland processes never see physical addresses they can be spread across as much physical memory as you have available so you can have more memory hungry processes running at once.
 

pallejr

Senior member
Apr 8, 2007
216
0
0
So because the virtual address just points to an entry in the page table, an entry that can contain whatever structure, the size of the physical address has very little to do with how many bits the OS is. AMD64 for example allows up to 52-bit physical addresses in PAE mode.