Confused about RAM #

  • Thread starter Thread starter Jorge Cervantes
  • Start date Start date
J

Jorge Cervantes

When I checked BIOS, I confirmed that 4GB memory (2 GB x 2) was installed in
my computer.
But when I looked at System Properties, 2.98 GB of RAM was shown. Could
someone explain this discrepancy?
Jorge
 
Jorge said:
When I checked BIOS, I confirmed that 4GB memory (2 GB x 2) was installed in
my computer.
But when I looked at System Properties, 2.98 GB of RAM was shown. Could
someone explain this discrepancy?

This is a hardware issue concerning the processor address space below
the 4GB barrier and the inability of 32-bit Microsoft client operating
systems to "see" the processor's address space above the 4GB barrier.
It's a problem that is based on an older architecture design for memory
addressing. In fact, your machine is using a bit more than 5GB of
address space but Windows XP cannot see any of it above 4GB.

Let's see if I can explain this in a few short paragraphs.

The processor works with data, it brings in data, processes it and
returns data. Every bit of data comes in to the processor from a memory
address and every bit leaving the processor goes to a memory address. A
32-bit processor has 4,294,967,296 memory addresses. This is the
processor's addressable memory range or the Address Space, with these
memory addresses the processor can directly access four gigabytes of
memory.

So what's the problem? The processor has enough addresses for 4GB of
RAM, why isn't it using all of it? The problem is that if the processor
gave all the addresses to the RAM it would have none left for other
things, anything and everything that needs to talk to the processor
would have to do so through the RAM or the processor would have to dump
RAM addresses to talk to other devices!

Your computer is not only made up of RAM, the processor has to work with
other hardware devices, it has to send and get data to and from some
of those other devices. Remember, the processor gets and returns data
to memory addresses, the 32-bit processor has a 4GB address range.

For example, the BIOS and system board will reserve and use a bit less
than 1 megabyte of address space directly at the processor, when the
processor needs to talk with the BIOS or motherboard it will do so
directly by using their reserved addresses, the addresses reserved by
and given to the system board cannot be used by the RAM. This
(oversimplified) example shows why a 32-bit processor cannot use all of
the RAM when 4GB is installed.

So now you may be thinking that 1 megabyte of memory addresses being
lost to the system board is a far cry from what your Windows
installation is seeing and reporting. Well, you see, most PCI devices
can communicate directly with the processor. These devices also reserve
exclusive memory addresses directly at the processor, if the video card
needs to talk to the processor it will do so at its reserved addresses,
the addresses where the processor is listening. Your other PCI devices
like sound cards, controller cards and so on also reserve addresses
directly at the processor, the processor can send and receive data
directly to and from these devices.

These devices can reserve a lot of address space, a high end sound card
can reserve 100 megabyte or more of address space. A video card with
512MB of on board memory has to have a way of sending the data in that
memory to the processor when needed, if all the memory addresses were
used by RAM the processor would have none left to satisfy the needs of
other devices. That is why addresses are reserved for exclusive use by
the PCI devices, the addresses that are reserved for these devices are
in turn not available for RAM addressing. The amount of memory address
space used by these devices can be as little as a few hundred megabytes
and, as with your computer, all the way up to 1GB and more.

It is important to note that the other devices do not use RAM, they
reserve or use addresses at the processor and in turn these addresses
are not available for the RAM, the RAM is in fact deprived of the
addresses and the RAM without address space goes unused. To overcome
this address shortage problem (newer) Intel 32-bit processors make use
of Physical Address Extensions (PAE) which widens the address width to
36-bits and greatly increases the available memory address space. The
use of PAE and 36-bit addressing allows the processor to access 64GB of
RAM, the RAM that was previously unaddressed can now be addressed.
Newer 64-bit processors have an even wider address width which greatly
increases the address space beyond the 64GB available to 32-bit PAE
processors.

The catch is that the PCI devices keep their addresses in the lower 4GB
address range and the previously unavailable address space for the RAM
is shifted *above* the 4GB arena and to access the RAM above the 4GB
arena the 32-bit operating system has to fully support this PAE feature,
if it doesn't it cannot access the RAM in the space above the 4GB
boundary. Raymond Chen has explained this very well here:
http://blogs.msdn.com/oldnewthing/archive/2006/08/14/699521.aspx

Windows 2000 Professional, Windows 2000 Server, Windows XP 32-bits and
Vista 32-bits do not make full use of this /PAE feature, they are unable
to use RAM addressed above the 4GB boundary. You need Windows 2000
Advanced Server or better to be able to fully use this /PAE feature. Or
you need to move to a 64-bit operating system which can access more than
4GB of RAM without the PAE "crutch".

John
 
When I checked BIOS, I confirmed that 4GB memory (2 GB x 2) was installed in
my computer.
But when I looked at System Properties, 2.98 GB of RAM was shown. Could
someone explain this discrepancy?




All 32-bit client versions of Windows (not just Vista/XP/7) have a 4GB
address space (64-bit versions can use much more). That's the
theoretical upper limit beyond which you can not go.

But you can't use the entire 4GB of address space. Even though you
have a 4GB address space, you can only use *around* 3.1GB of RAM.
That's because some of that space is used by hardware and is not
available to the operating system and applications. The amount you can
use varies, depending on what hardware you have installed, but can
range from as little as 2GB to as much as 3.5GB. It's usually around
3.1GB.

Note that the hardware is using the address *space*, not the actual
RAM itself. If you have a greater amount of RAM, the rest of the RAM
goes unused because there is no address space to map it to.
 
Back
Top