Re: the "I can't see all 4 GiB RAM" problem - what are the reserved addresses?



Orson Cart wrote:
There are thousands of posts in forums, where some novice whines:

I increased my RAM to 4 gigs but Windoze/Ubuntu only sees XXXX!

And the answer is that a significant percentage of the 32-bit
address space is reserved for devices (even if there is no
onboard VGA) so upgrade to a 64-bit OS and add even more RAM.

I checked a few PCs with 4 GiB RAM, and I get about 3.25 GiB in
one and another even less than 3 GiB. It seems a lot to lose
a gigabyte. Is there a detailed account somewhere of what these
reserved addresses are, and why so much is needed?

First, some concepts.

OSes have supported PAE (physical address extension) for a while.

The processor and chipset have a 36 bit address bus. The addresses are
physical. The memory mapper, maps a 4GB chunk of virtual space, to
some area of the 64GB physical space.

What that means is, if you had a computer with 64GB of memory
installed, you started 16 different applications each using
4GB of memory, they could use the entire 64GB, and all from the
comfort of a 32 bit OS. One program cannot use the entire 64GB
on its own. To use all the memory, takes 16 or more programs.
(If the OS was 64 bit, and the application was "pure 64 bit" type,
then you could use the entire 64GB in one program.)

Now, Microsoft disabled PAE, after WinXP SP2. The virtual to physical
mapping process, needed a bit for NX (no execute protection), and while
on the one hand, the necessary space in the mapper occurs if you use
PAE mode, at the same time, Microsoft set the "memory license" to 4GB.
It means PAE is enabled by default, but you're prevented from
using the entire 64GB by virtue of WinXP "not being a server OS".
We wouldn't want to cut in the lucrative server market, with
desktop OSes.

Someone here, tested out these concepts, in Vista 32, and managed to
change the OS such that it would run with 8GB (on a 32 bit OS).
That's where I got this info. This demonstrates that in fact, there
is no real reason to not being doing it this way.

http://www.geoffchappell.com/notes/windows/license/memory.htm

*******

I have one other experience to share with you.

I run WinXP SP3 x32. For an experiment, I installed 6GB of memory
(all the DDR2 I own). I installed this RAM Disk software and used it to define
a 2GB RAM disk.

http://memory.dataram.com/products-and-services/software/ramdisk?

This is a benchmark of the RAMDisk when installed. (My RAM isn't
very fast.)

http://img196.imageshack.us/img196/8694/hdtunedataram2gbabove.gif

Next, I put a 2GB pagefile on that disk. I made the pagefile, the
only pagefile on the system.

Then, I started loading up applications.

Normally, at around 2.6GB usage or so (of 3.25 "free"), the system
becomes "grumpy". There is paging out to disk. IF I launch another application,
the general slowdown might be too much for me to continue to run that way.

When the RAMDisk is used for paging, I can sail right past 3.25GB with hardly
any effect. No slowdown. And the reason for that, is the 4GB/sec I/O rate and
zero seek time, makes paging virtually invisible. I was even able to
go past the 4GB mark (I stopped at 4.5GB, because there wasn't any point
going further). Now, of that 4GB, some is always stored on disk, so
it's not all paged in at the same time. The 3.25GB limit still exists.
One of the applications will be paged out. So it's not entirely effects free.
But for a lot of situations, it gives the impression I've got a 4GB (or more)
system. It's because paging is super-fast with that RAMDisk.

In terms of the license:

1) You can't have more than 4GB of addresses. These are
addresses that user programs are using. These are
addresses in "user space".

2) The RAMDisk is a driver, and lives in driver space with the kernel.
(If the driver dies, the kernel dies.) That appears to let it have
access to the entire PAE space. (Note that on AMD systems, like S939
or later, PAE space on AMD is 40 bits.)

3) The addresses used for PCI and PCI Express busses, are real. They represent
"memory like" addresses, which are kept below the 4GB mark purportedly so
that only 32 bit addressing will be needed on PCI cards. The bus usage
subtracts from the 4GB limit.

4) The sum total of the remaining, accessible physical memory, plus the
pagefile, is available for program usage. On a regular system, the hard
drive is painfully slow, if you go over 3.25GB.

5) In terms of address allocations, they're done by the BIOS. The BIOS plans
the address map, before the OS starts. Addresses are assigned in wasteful
256MB chunks. If you have no PCI cards, but there is physical evidence of a
PCI bus being present, 256MB is assigned for it. If you have a PCI Express
bus, it's treated like PCI. If you need 256MB + 1 byte for a PCI Express video
card, then the BIOS allocates 512MB. I have a 512MB video card on PCI Express,
and my "free" is 3.25GB. Someone using two 512MB video cards in SLI, would
find the "free" value was 2.75GB.

Now, is that RAMDisk bulletproof ? Not entirely. I had one event, where I
started a program, and there was no GUI on the screen. The program was running,
but there was no interface. On another occasion, I started a 3D game, and "kaboom"
it exited, just like that. So while the RAMDisk makes a great demo of what is
possible with PAE, and loopholes in the memory license, it isn't a good enough
config to keep for everyday usage.

I consider that Geoff Chappell article, to be a good reference. At least,
to get above the usual statement of limits.

HTH,
Paul
.



Relevant Pages

  • Re: Identification 32/64 bit Linux
    ... PCI adapters in your system, and many devices - even those on the ... limit of the actually installed RAM, ... actually supports via its available memory slots. ... Ah, you are talking about the days of DOS now, but that was a different ...
    (comp.os.linux.setup)
  • Re: Going from 2GB to 4GB ram...
    ... So I'd be wasting my time buying 2 more GB of ram? ... processor can directly address 4GB of memory. ... of the video card. ... There is an option available called 'PAE' (physical address ...
    (alt.comp.periphs.mainboard.asus)
  • Re: Making use of non-addressable wasted RAM on 32 bit systems?
    ... Is a RAM drive the only use for extra memory on a 32-bit Windows system? ... The processors have had PAE support for a while. ...
    (alt.comp.hardware.pc-homebuilt)
  • Re: Win XP Setup with 4 GB of RAM
    ... XP uses memory mapped IO. ... XP will not use RAM which overlapps the IO space. ... Isn't the PAE instruction used to enable 35 bit addressing? ... designs that have brand new architectures that ...
    (microsoft.public.windowsxp.setup_deployment)
  • Re: Cannot activate sbcl
    ... Somehow I've managed to use 16GB and I'm using the 32bit version of Windows XP, and I was able to use all that memory (e.g. ... supports PAE. ... at any one time, but can access RAM above 4GB through AWE, a paging ...
    (comp.lang.lisp)