8

Don't know if this is the right place to ask this question.

I've been reading that 32bit OSs (like the Ubuntu i'm running right now) can't adress more than 3.2gb or 3.3gb of RAM memory.

I remember for my old Computer Architecture course that the memory limitation was 2^32 "pointers" (don't remember the right word). I mean, the memory was represented like an array where the CPU can acces it directly, but up to its limit. If the CPU is 32 bit, then it can address 2^32 words, if it's 64 bits 2^64, etc.

So, if what i said before is right, then, my OS should be able to address 2^32 = 4294967296 = 4Gb.

I'm thinking maybe some sort of space is reserved to the particular use of the Kernel, cache, buffering or swapping. But don't have the correct answer.

Can you give me a hint?

1
  • Feel free to vote up any answers that helped you too. Nov 17, 2010 at 20:43

6 Answers 6

11

Windows uses some of the hardware addresses meant to address memory, for other hardware (like USB, SATA, Disk Controllers, whatever). So some of those hardware addresses cannot be used for your memory. Hence the limit.

To my knowledge, Unix/Linux CAN address a little more than the 3.2GB limit of Windows. This is because Linux uses a different addressing scheme.

There is also a function called PAE (Physical Address Extension) which makes 32-bit OSes use more than 4GB.

1
5

This has to do with memory the BIOS has to reserve for base processes like transferring data to devices and video memory. Memory above about 3.2GB (it varies from system to system, I've seen 3.6GB and 3.1GB) gets remapped over the 4GB boundary where PAE is required to access it. Different systems handle this case differently. Some systems don't bother accessing it, giving only 3.2ish GB of RAM for processes. Others just seamlessly use PAE, which is slower, for processes.

5
  • True.. around 3-6% CPU hit just for using the PAE extensions
    – Arenstar
    Nov 17, 2010 at 20:53
  • @SysAdmin1138: Address translation with no page faults costs a few percent whether PAE is on or not (it's that low b/c it is almost always handled in the TLB, no memory refs needed). Do you have a reference for the claim of up to 3% more with PAE? Where? Is it in the "TLB miss" case, the soft page fault case, the hard fault case (that is wildly improbable, as CPU time in the hard fault path is swamped by disk read time)... under what circumstances was this measured? Mar 2, 2015 at 22:03
  • @JamieHanrahan I believe you meant to tag arenstar, not me. Mar 4, 2015 at 1:55
  • @SysAdmin1138: Correct you are. I'll delete that and repost it to Arenstar. Mar 4, 2015 at 9:05
  • @Arenstar : Address translation with no page faults costs a few percent whether PAE is on or not. It's that low b/c it is almost always handled in the TLB, no memory refs needed. Do you have a reference for the claim of up to 3% more with PAE? Where? Is it in the "TLB miss" case (but no OS code), the soft page fault case, the hard fault case (which I'd find wildly improbable, as CPU time in the hard fault path is swamped by disk read time)... under what circumstances was this measured? Even if true, the additional RAM should more than make up the performance difference. Mar 4, 2015 at 9:08
3

PAE is not standard in 2.6 kernels of Linux.. But it is supported above 2.3.23 kernels..

PAE allows usage of up too 64GB of ram on a 32bit system However limiting a single process to the 32bit space.. and degradation of performance overall/ not just for using above 4gb..

I had to change some growing databases operating systems to 64bit so MySQL could take advantage of the RAM installed.. The speed difference was noticeable :D

Take a look here http://en.wikipedia.org/wiki/Physical_Address_Extension#Linux

1

Your 32-bit OS can address 4GB of RAM however the PC architecture means that Video memory and a lot of other resources are memory mapped so not all of that address space is free for use as ordinary RAM.

1
0

== Off Topic ==

This reminds me of the old age of DOS, where a computer could only see 640k of RAM even though more might be installed. Even though architecturally 2^20 bytes (1024k) where accessible the top 384k (uppper memory area) could only be addressed with tricks.

1
  • 1
    Ah, the good(?) old days... Yeah, I thought of the QEMM/HIMEM.SYS era when I read this question, too. Nov 18, 2010 at 9:54
0

The Wikipedia article on the "3GB barrier" explains it pretty well. If your OS doesn't support PAE you're going to be limited to 4 GB physical address space, and that has to include both RAM and mappings of PCI device "registers" and "memory". The usual big consumer in the latter category is your video card. https://en.wikipedia.org/wiki/3GB_barrier

You must log in to answer this question.