Saturday, September 06, 2008

The limits of 32-bit computing

Back in school, I was nuts about CPU design. Wanted to dig into the world of snooping & snarfing the L1 / L2 / L3 caches resident either on the chip or off to the side. When building my i8088 based computer, it was a big weight off my shoulders in being able to use Memory Mapped I/O. You’d have a set of addresses for RAM, then another set for a printer. Made things very easy. Not a big deal to use up a 1MB address space (20 bits) in that way when I was playing with kilobytes of memory storage. And 32-bit? 4GB of addresses to use (kinda like IP addresses). But that was the early 1990’s.

AppleInsider has a good series about the limits of 32-bit computing and how Windows & OS X approach the problem. I believe the second part of the discussion is quite good at describing the infrastructure of the two operating systems, as it pertains to address space using Intel chip sets. These chip sets still use MMIO, but installed physical RAM amounts have been rising such that the IO space & RAM are butting heads.

What I didn’t realize is that the VRAM on a video card is also counted in the IO address space. I had thought that memory was controlled by the GPU, fed data through the PCI-e bus. But it seems that the chip sets need to carve out everything plugged into the motherboard. The chart is quite good at illustrating the architectural issue at hand. If you have 1/2GB on the video card, you lose 1/2GB of RAM addressing, even if the physical RAM is there. This is the crux of the issue facing users of Intel chip sets (maybe AMD too, but I’m not sure).

There are two parts to the issue: Intel CPU’s & MMIO (now spreading out their 64-bit goodness). The OS approach to memory usage.

As shown, newer hardware can easily work with 64-bit address spaces. It is the operating systems we use daily that are lagging behind. Windows is a system that is either all 32-bit or all 64-bit in its dealing with the world. OS X has taken a hybrid approach, moving portions of the infrastructure from 32 to 64 bits over time. This allows those parts to take advantage of the huge memory allocation space. Windows went down one path which traded performance (their TLB management is better) for future expansion (harder to move legacy 32 bit software forward).

Why is this a big deal? It is a historic fact that CPU speeds and RAM usage always go up, year after year. But the seemingly vast expanse of 4GB is about to hit the reinforced siege wall of address limits. Sucks when math rears its ugly head. OS X has a plan, over time, to address the issue and move their users to an environment of 2^64. Microsoft user base and its like of XP make for a more interesting future. Interesting in that XP will be around for quite a lot longer than MS wants it to. By that token, so will Vista as that is split into 32-bit & 64-bit versions as well. Win7 is supposed to help fix this, but that is not for another 18 to 24 months at least and that will be a v1.0. There is no consistent effort move Windows users to x64 Vista over time.

This is not to make a joke, but to point out that users will begin to find the real limits of the systems at hand. The majority of those systems are x86 + WinXP. It is stuck under the 4GB limit, along with the Intel MMIO handicap, which lowers useable RAM. Just legacy things piling up on each other. The question to pose is how will the memory limit affect application development and subsequent data manipulation. HD Video editing needs lots of space. As does image editing. Same each iteration of an OS. What kind of stagnation will WinXP users find themselves in 12-18 months from now?

For some users this is a tempest in a teapot. 2GB of RAM is more than enough. As long as they don’t want to change applications or the base OS. There is no rule that a computer can’t run the same software for 20+ years. An Apple ][e will still run VisiCalc just fine today as it did in 1985. But if you want to play Spore, manipulate HD video, or anything else that needs memory, design trade-offs will need to be made. For software innovation to move us forward, especially as more CPU cores become available, the systems need to grow. More RAM to hold data locally so as to not take the hit going to the hard drive to swap. WinXP users may find themselves stuck with fast CPU’s hog-tied due to too many page swaps. OS X users will find that as the amount of memory expands beyond 4GB, their systems will run faster. The short leap to Snow Leopard next year will be a lot easier for users than the long leap Windows users have to either x64 Vista or 2010 Win7.

-Mike M.



0 comments: