Mac OS X is 64-Bit, Again

| Snow Leopard

If you're wondering why there's all this talk about bits, especially with the upcoming introduction of Mac OS X 10.6, aka Snow Leopard, you're not alone. Everyone seems to be tossing around the term 64-bit, and it can get confusing. The terms "64-bit processor" and "64-bit operating system" get tossed around quite a bit, but the exact definition isn't exactly clear. Let's try to tear apart this mess.

Processor

The processor is the brain of your computer, and best deals with information in chunks which are, as you may have guessed, a certain number of bits in length. Let's start with a simple example, the 6502 in the first Apple ][ computers. This processor had 8-bit registers, and had a 16 bit memory address space.

This means registers could represent 256 (2^8) values, and there are 64K (2^16) memory locations, each of which holds an 8-bit byte. Fast forward to the latest Core 2 Duo processors, whose registers can represent 2^64 values, and can address up to 2^64 bytes of (virtual) memory.

Operating System

An operating system can take advantage of the range of values offered by modern 64-bit processors, but it isn't quite as simple as just creating a new version of the OS after turning on the 64-bit switch. Advances in processor technology take time to be properly integrated into both existing and future systems. Therefore, not all parts of an operating system may use the latest x-bit technologies.

Apple, like others, has gradually introduced portions of 64-bit functionality into their most recent operating systems.

Tiger (10.4)

Tiger Developer Overview states that:
"Tiger obliterates that restriction and allows applications to access a 64-bit address space when running on the PowerPC G5. Better yet, this support comes with no compromise in the ability to run current 32-bit applications." Specifically, "Mac OS X Tiger breaks the limitations of 32-bit computing and allows developers to create command-line applications, servers, and computation engines that can work with mind-blowing amounts of memory." Applications in 32-bit operating systems can normally access 4GB of memory (not necessarily RAM) at once.

What this means is that Tiger would allow you to jump into the 64-bit world with applications that didn't directly interact with the user. You could certainly write a program to perform operations in 64-bit mode, including access to a crazy 4TB of physical and 16 exabytes of virtual memory, but they'd still have to deal with the rest of the operating system that was still 32-bit. Fortunately, with enough work, operating systems and processors can support software running in both 32-bit and 64-bit modes.

Leopard (10.5)

Leopard introduced additional 64-bit support, such as the Cocoa framework, which is the modern foundation for Mac applications. The Leopard Technology Overview also suggests that you can gain increased performance from transitioning your applications to 64-bits, by using 64-bit registers available in the latest processors such as the Intel Core 2 Duo (not Core Duo, which is a 32-bit processor).

Snow Leopard (10.6)

Snow Leopard promises even more 64-bit support. Nearly all system applications — including the Finder, Mail, Safari, iCal, and iChat — are now built with 64-bit code. Apple also states that all system applications except DVD Player, Front Row, Grapher, and iTunes have been rewritten in 64-bit. Snow Leopard also introduces new 64-bit KEXTs (Kernel Extensions) 64-Bit Drivers and a 64-Bit Kernel. This could introduce some upgrade issues, since software developers need to recompile their kernel extensions and drivers.

Developers may also run into other issues. For example, MenuMeters 1.3 does not run on Snow Leopard because the process that hosts the MenuMeters plugins (SystemUIServer) is now 64-bit. There are a number of subtle 64-bit bugs in MenuMeters, so more than a simple recompile is needed (an update is coming from the developer). iStat Menus isn't 64-bit compatible, either, but a new Snow Leopard version is in development.

What It All Means

Upgrading the deepest levels of OS X to provide 64-bit support is the final step is making Snow Leopard what many can call a true 64-bit operating system.

To summarize, the benefits of a 64-bit operating system are twofold. The first is that you can more effectively deal with large files, such as images or movies, since the 4GB RAM limitation of earlier 32-bit operating system components is no longer a concern. The second is that, if an application takes advantage of 64-bit registers in the latest processors, you can realize a significant gain in performance.

Sign Up for the Newsletter

Join the TMO Express Daily Newsletter to get the latest Mac headlines in your e-mail every weekday.

Comments

Nemo

Dear Mr. Braun:  I understand that Snow Leopard’s Mach kernel is fully 64-bit, though Snow Leopard can boot into a 32-bit version, and is fully written in Apple’s Cocoa frame work.  If this is true, what deeper level of Snow Leopard is there to upgrade to make Snow Leopard a true 64-bit operating system?

Jeff Butts

Nemo,

The “deeper level” John refers to is booting the kernel in 64-bit mode by default. By my understanding, Apple currently has Snow Leopard booting a 32-bit kernel by default, to allow greater hardware compatibility…trying to load 32-bit kernel extensions/modules/drivers in a 64-bit kernel is troublesome at best, and uselessly unreliable at worst.

It’s not so much that Snow Leopard CAN boot into a 32-bit version…but that it DOES, by default. Many hardware drivers and other kexts are still clinging to 32-bit code.

(portions of this email contain information discussed in MGG 216)

Alan Gabrielli

So if I have this right, a Core Duo machine, which is 32-bit, will run Snow Leopard in 32-bit mode only and avoid all these potential problems.

Jeff Butts

That’s my understanding, yes. The kernel will run in 32-bit mode. Furthermore, all of the applications will stay in 32-bit mode…since the Core Duo doesn’t support 64-bit processing at all.

If you have a Core 2 Duo, though, the kernel will probably load as a 32-bit kernel, while the applications (Mail, Finder, etc.) all run in 64-bit mode.

John F. Braun

Thanks for the clarifications, guys.  As indicated, another complication is that the EFI (Extensible Firmware Interface) which communicates with the machine’s firmware can be 32-bit or 64-bit, and there are 32-bit and 64-bit versions of the kernel.

Nemo

Well, does the foregoing discussion mean that Snow Leopard boots into the 32-bit kernel even if your Mac has a Core 2 Duo?  That is, does Snow Leopard identify the Intel CPU in your Mac and boot into different versions of its kernel, depending on whether your Mac has a Core Duo or Core 2 Duo CPU?

Jeff Butts

Again, this is just my understanding…but I believe that 10.6 will boot a 32-bit kernel, regardless of whether your kernel and EFI support 64-bit. It will basically be an “opt in” situation, whereby you have to enable the 64-bit kernel.

Later on down the road, as point releases come out, we might see that change, and the installer might say, “Oh, this system supports full 64-bit, so let’s boot the 64-bit kernel.” Right now, though, the kernel will be 32-bit by default…once again, to preserve compatibility with third-party kexts/modules/drivers.

malingo33

I also found custom system preference application that checks your EFI and is capable to switch kernel mode:  http://www.thrull.com/corner/mac/SystemModeConfigurator/ . But there is no good reason to use 64 bit kernel.

Log-in to comment