I have a 32/64- bit dilemna

somerandomasian

Honorable
Oct 14, 2012
83
0
10,640
Hi, I am currently picking out parts for my first pc build, mainly used for gaming. I am stuck between getting windows 32 or 64 bit. The only reason why I am considering windows 32 bit is because my friend has one lying around and offered to give it to me for 20 dollars, and with the 80 dollars I save, I can upgrade from an i3 to an i5. Is that a good enough deal to justify getting 32 bit?
 
Yes and no, that is NOT how GPU memory is addressed.

To your CPU there is a single 32 bit linear address range. The NT Kernal then divides that range logically into two pieces, Kernel and User address space each of 31 bits. That leaves 2GB address space for each program to use and 2 GB of address space to the kernel. The kernel then takes this space and cuts out a section for mapping ROM and external addressable memory (graphics RAM). AGP GART allows GPU memory to be mapped directly into physical space and this is what the kernel will do. Back when GPU's had 32~128MB of memory it was fine to map the entire range, but as cards hit 256MB+ it became impractical so now the kernel will use a page table to map different regions of GPU memory in a single 256 or 512MB section of memory. So having a 2GB GPU memory will not take up 2GB of addressable space, not unless you set the AGP GART to 2GB which is stupidly large (should crash your kernel).

Now notice I said 2GB per program, that is because programs use virtual address space while the MMU use's real address space. Part of a programs memory can be assigned to the paging find on the HDD, even if there is nothing being stored to that address space.

In short a 32-bit NT Kernel will break 4GB down into the following regions.

2GB User land mapped to multiple virtual address spaces
2GB Kernel Memory

Out of that 2GB multiple sections are sliced off, anywhere from 256MB to 1GB worth. Typically the last 512MB is cut out to be used for ROM / PCI card address space. Then more is cut out if a larger GART frame is needed. This isn't memory that is actually being used, just address space that needs to be used for the drivers to work properly.

Now you can get around that be using the /3GB boot option. This will tell the NT Kernel to use 3GB for user space and 1GB for kernel space, this can be VERY dangerous as some drivers expect certain ranges to be free that now might now be. If your BIOS and CPU have support for it you can enable PAE mode. PAE made allows access to memory above 4GB by using a 36 bit hardware address table to map into the 32 bit virtual address table. This means everything still access's their memory inside their respective 32-bit table but the kernel use's a page frame to map different sections of memory beyond 4GB down into a range under it. It's slower as each region must be remapped on each memory access, also programs are still limited to 2GB of virtual address space each.

Going to 64-bit by pass's all the headache of remapping memory blocks and GART tables. The 64-bit range is so large that you can directly map all your physical memory, your GPU's memory, the PCI expansion address's and still have plenty of room to spare.

Synopsis, there are ways to make 32-bit work but their complex and slow. Best choice moving forward is a 64-bit OS.
 

mathew7

Distinguished
Jun 3, 2011
295
0
18,860


It has nothing with HW. The reason for 4GB limitiation is that PCI(-e) devices have a 32-bit address bus and thus cannot access past the 1st 4GB. So 32-bit drivers under PAE (which allows 32-bit CPUs to use up to 64GB RAM) must take special care to put their buffers in that 1st 4GB space (actually this is still relevant for 64-bit OSes, but it's a rule, not an option). Since cheap HW was done with cheap development, not many drivers did this (especially around 2000), and when 4GB RAM started being used with them, MS decided to limit by SW instead of getting support calls for cheap, out-of-business, HW drivers. It's hard to find the info, but 32-bit XP SP0 and SP1 could use more than 4GB of RAM.

The reason motherboards came into discussion is that the memory controller is configured by motherboard BIOS/firmware to remap the PCI-overlapping space near the top 4GB RAM. Some motherboard offer this as an option allowing either "discarding" the overlapped RAM or remapping to a higher address. Maybe these are the MBs 9_breaker is talking about, but this is still relevant to OSes/kernels that can access above 4GB.

As for GPU memory, palladin9479 said it right: the video memory is split in chunks that a few are mapped at a time into the 4GB bus, thus with 128MB or 256MB of CPU space you can access the whole 3GB of a high-end GPU. As a sidenote: While AGPGART is in manys memories, the AGP part died a long time ago, but the GART part is still used today.



Actually here I disagree: the 2GB split is done on per-process, while the ROM/PCI space is on CPU level (which with PAE is 36-bit). The kernel itself (which is mapped to the upper 2GB process space) can reside anywhere in RAM (or pagefile).
 


Dang it palladin, you beat me to this one.
 
Actually here I disagree: the 2GB split is done on per-process, while the ROM/PCI space is on CPU level (which with PAE is 36-bit). The kernel itself (which is mapped to the upper 2GB process space) can reside anywhere in RAM (or pagefile).

I'm referring to the NT executive agent which is what divides up memory. The per process memory is called virtual address space and is a linear amount from 0 to 2GB given to each process. The kernel memory manager though must manage real memory using the linear address space the CPU use's, otherwise task switching and and memory maps would not be possible. Thus the highest 31 bits are reserved and no user land program may use them without the /3GB switch.

At no point in time did any 32 bit NT OS use more then 32 bits for addressing and thus never use more then 4GB worth of active working memory. PAE is the method that was used to "get around" the barrier and it's been around since NT 4.0.
 


If at all possible yes. 64 bit Windows 7 will last you a long time and is a wonderfully stable platform. I was amazed at the progress Microsoft has made, and I'm a Solaris guy.