Posted by: advapi | April 30, 2008

Windows XP/Vista 32-bit and 4GB ram problem… (Part 1)

Yesterday I’ve ordered other 2GB of DDR2 RAM (Crucial Ballistix PC8500) in order to reach the ammount of 4GB… I was aware that 32 bit version of window’s can’t address the whole 4GB but now I’m trying to discover the reason and why passing to 64-bit OS is a must for modern PC.

So people may say : “I’ve got a 32 bit processor, so my CPU can address 2^32bit=4294967296 that’s 4GB,why can’t my Operating System (OS) recognize 4GB, but only 3-3,5?”

That’s due to “memory mapped IO reservation”, in short words any CPU can address memory from 00000000 to FFFFFFFF, but part of those address space is used for bios,peripheral,pci cards and so on….. u can just check from Device Manager on your windows, for example on my laptop video memory is addressed from D1000000-D1FFFFFF that correspond almost to 3,5GB so if u point to that location (without considering PAE feature) you’ll point to video memory, in no way to ram one.

One solution is the one I’ve told before, the PAE (Physical Address Extension), that’s a feature of modern processor to address more that 4GB on 32bit operating system, referring to what’s written in the PAE link u  can read :

The x86 processor hardware is augmented with additional address lines used to select the additional memory, so physical address size is increased from 32 bits to 36 bits. This increases maximum physical memory size from 4 GiB to 64 GiB. The 32-bit size of virtual address is not changed, so regular application software continues to use instructions with 32-bit addresses and (in a flat memory model) is limited to 4 gibibytes (GiB). The operating system uses page tables to map this 4 GiB address space onto the 64 GiB of total memory, and the map is usually different for each process. In this way the extra memory is useful even though no single regular application can access it all simultaneously.

So page table means pagination, so memory pages are taken off from ram and putted in OS pagination file, this can permit to see the whole 4GB, but at the same time will have two limitation:

  1. Process will use 32-bit addressing, and if I’m not wrong 2GB max
  2. Small decrease of performance due to pagination

The only way to use 4GB or more, is to pass to a 64bit OS, in nexts post I’ll discuss about how chipset can handle 64bit addressing.

Wow, a serious post for my last day in Turin……..that’s cool


Responses

  1. Very interesting post about memory allocation, I’ll wait for part 2


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: