Friday, September 11, 2009

Windows 32 bits, all versions: Max memory is 3GB

A friend of mine contacted me to ask me what is the maximum amount of memory that a 32 bit windows may handle. Because he knows that it should be 4GB, nevertheless, he has seen very many computers, especially laptops, that come with 3GB.

Regardless of which Windows of 32 bits you are using, whether XP, Vista, or Windows7, the limit is around 3GB. The reason is that the BIOS of the computer will reserve addressing for memory mapped I/O for the video card, PCI devices, etc. The reserved addresses depend on your devices, but it should be clear that a 512MB video card will take at the very least 512MB of addressing. When the operating system starts, it must respect the reserved addresses and if it is a 32 bit Windows, then it will be able to only address 4GB minus whatever the BIOS took. A 1GB video card will leave less than 3GB of addressing space to refer to RAM, typically, 2.8 GB.

Unbelievably, Microsoft keeps doing Operating Systems susceptible to these kind of problems. 20 years ago, it was the problem of Low, High, Extended and Expanded memory, exactly because of the addressing space that the BIOS reserved: The 80x86 in real mode have only 1MB of addressing space, of which the BIOS needs about 384K to map devices, so, the RAM memory addressable with the "real" mode is 640K. When the AT computers and their successors began to come with 1MB or more, one had to do very complicated DOS settings so that the DOS would map a memory window in the BIOS region to the memory above the 640K, and do the swapping. Alternatively, you could have a DOS extender that would run the application in "protected mode", using the full addressing capabilities of the processor, but that had to reset to "real" mode every time it had to use DOS. The problem is that DOS was absolutely tied to the "real" mode of addressing, a major design fault of Microsoft.

Nowadays, we have grown our memory usage 4096 times (12 bits in 20 years, or a year to year rate of 51% growth) and experience the same problem...

What should Microsoft do?
1) Port all of its device drivers to 64 bits. One of the contributors to Windows XP popularity is that, without XP being architecturally any superior to Windows 2000, it came with a very large catalog of device drivers and this greatly simplified the major hassle of hunting for the device driver and dealing with the installation complications. But today there are gazillion devices for which M$ made device drivers for, that don't have an updated version for x64.
2) It should create a virtualized sandbox to connect peripherals, especially USB peripherals, in which the user installs the old 32 bit drivers for the device and internally the operating system runs them in a virtual machine environment.
3) Put pressure on AMD and Intel to extend the AMD64 instruction set with a driver compatibility mode compatible with the driver model of old 32 bits. (Remember, AMD64 is binary compatible at the application level, but the device drivers and kernel modules need to be "long mode")

What should the customer do?
1) Cease and desist at using 32 bit Windows as host operating system
2) Try Linux 64 bit and virtualized 32 bit Windows
3) Put pressure for device manufacturers to provide x64 drivers

2 comments:

Anonymous said...

Very good. I like your post. But, it is for person knows very much about.

Eddie said...

Thanks for your comment.

What brought you to my blog?