Myths of Snow Leopard 2: 32-bit Support
June 17th, 2008
Daniel Eran Dilger
Apple’s limited comments on Snow Leopard, the next version of Mac OS X due in about a year, have opened the playing field for rampant speculation. Here’s a look at a series of myths that have developed around the upcoming release. The second myth of Snow Leopard:
Apple is dropping support for 32-bit Intel Macs because Snow Leopard is 64-bit.
This myth is rather silly, but has lit up Apple discussion boards and even been reported by a few sources that take themselves somewhat seriously. The idea may be based upon the Windows 32/64-bit Conundrum, a problem Apple does not face. Microsoft has to ship multiple architectures of Windows XP, Vista, and Server:
- IA-32, for the 32-bit Intel x86 architecture of most PCs (the same as that of the early Intel Macs).
- IA-64, for the 64-bit Intel EPIC architecture developed for Itanium and largely unused by anyone (now Windows Server only).
- x64 (aka AMD64), the 64-bit x86 architecture developed by AMD and copied by Intel after the humiliation of IA-64′s failure. It is the mainstream 64-bit PC architecture, and is used in the latest Core 2 Duo Intel Macs.
The state of Microsoft’s art has led Windows Enthusiasts into confusion, as they tend to think that if Microsoft is doing something, it is probably the only way to do it. As Mary Jo Foley wrote, “Leopard is the first 64-bit only version of a desktop client. Vista comes in 32-bit and 64-bit varieties. And most expect Windows Seven will still be available in 32-bit flavors. Until 32-bit machines go away, it seems like a good idea to offer 32-bit operating systems.” She was apparently being serious, and wrote that in the context of an article insisting that Leopard looked like Vista.
Ten Myths of Leopard: 10 Leopard is a Vista Knockoff!
The Windows 32/64-bit Conundrum.
The problem for Microsoft is that its IA-64 and x64 versions of Windows actually run from different code bases and offer poor compatibility with a lot of existing 32-bit software. That problem is exacerbated by the fact that the 64-bit versions of Windows don’t run on 32-bit PCs. That means the market for developing 64-bit drivers and apps for Windows is artificially small, and can’t get bigger because there are software barriers to adopting 64-bit PCs that are of Microsoft’s own doing. That chicken and egg problem has no solution outside of Microsoft figuring out how to merge its code versions together, which it doesn’t have the time, inclination, or expertise to do.
Microsoft is betting that users will upgrade their PCs to 64-bit machines and continue to buy and run the old 32-bit version of Windows until it can manage to clean up the sticky bits and deliver a 64-bit, EFI savvy version of Windows for the mass market. That looks unlikely to happen by Windows 7 in 2010. Perhaps Windows 8 in 2013 will deliver what Mac OS X Leopard did in 2007.
Apple’s rather elegant solution is to run whatever binary is appropriate to the existing hardware. That’s also why Apple has been able to support both PowerPC and Intel hardware across a user base of roughly 20 to 27 million Mac OS X users since 2006. Microsoft couldn’t support PowerPC and Intel in Windows NT 4.0 despite having a far larger user base, greater resources, and a monopolistic lock on the market.
In addition to being able to support entirely different processor architectures, Apple also supports the conventions of running either 32 or 64-bit code. If Leopard runs on a 32-bit Mac such as the first generation Core Duo machines, it runs the 32-bit binary. If it runs on 64-bit hardware such as the latest Core 2 Duos, it executes the 64-bit binary. There is no advantage to being unable to run 64-bit software; Mary Jo Foley was just talking past her core competency of praising Microsoft.
Windows Vista, 7, and Singularity: The New Copland, Gershwin, Taligent
How Apple’s Firmware Leapfrogs BIOS PCs
32 + 64 = Universal Binary.
Rather than shipping separate editions that only work on one type of hardware and can only run one type of binary, Apple’s Universal Binary approach allowed it to ship one edition of Leopard and will similarly enable one edition of Snow Leopard. In order to take advantage of 64-bit processor features, apps need to package a 64-bit version of their executable into their Universal Binary.
So far, the majority of Leopard system apps delivered by Apple are 32-bit. In fact, there are only two 64-bit apps that ship with the OS: Xcode and Chess. The advantages of moving to 64-bit apps apply mainly to those that need to access large memory spaces, such as apps working with large files or data sets. For some apps, moving to a 64-bit binary actually causes them to run slower, because they have more memory to manage. Overall however, Apple found that moving the entire OS to 64-bits created an system wide performance gain of 15%. That’s a nice jump for just doing a recompile.
For that reason, all system apps in Snow Leopard will be 32+64 Universal Binaries, unlocking more of the latent performance available in modern 64-bit Macs. Tuning these apps to perform as well on 64-bit G5 PowerPC Macs would be a large investment for little upside, benefiting a relatively small number of G5 owners at the expense of diverting resources from optimizing the performance of today’s much faster 64-bit Intel processors. That helps to explain why Snow Leopard is dropping PowerPC support.
At the same time, Snow Leopard is also moving to a 64-bit kernel, an essential step in supporting more than 32GB of RAM. That means developers will need to deliver 32+64 bit versions of all their kernel extensions and device drivers. All plugins will also need to provide 64-bit support as well, including printer drivers.
In a year, Apple will have sold another roughly 8 million Macs, most of which will benefit from 64-bit software support in Snow Leopard. Another 15 million Intel Macs have already been sold, resulting in a roughly 23 million Intel Mac installed base at the debut of Snow Leopard.
At the release of Tiger, there were only about 16 million Macs in the entire installed base. At the release of Leopard, there was a 22 million Mac installed base. Today there is a 27 million Mac installed base, 12 million of which are PowerPC. The proportion of 64-bit Macs is quickly outnumbering the active number of PowerPC models that warrant buying a new operating system for.
Omni Software reports that 83.5% of its customers are actively updating their software from Intel Macs, compared to just 16.5% on PowerPC Macs. That makes it quite a no brainer why Apple is dropping PowerPC support and throwing its resources behind 64-bit optimization. Apple is looking at where the puck will be next summer, not preparing to hit it where it currently lies.
Getting it Right the First Time Around: LLP64 vs LP64.
Apple not only developed a smooth transition plan to 64-bits, but also chose a 64-bit model that is not only more broadly compatible but is also more powerful than the stopgap, limited 64-bit model Microsoft chose. Windows’ 64-bit development model is based on LLP64, which is really a 32-bit model that uses 64-bit addresses. Microsoft explained why it chose this model in The Old New Thing : Why did the Win64 team choose the LLP64 model?
Essentially, Microsoft hoped to add 64-bit pointers to allow apps to access more RAM while retaining 32-bit integral types for compatibility with all of the legacy operating system constructs in Windows that made assumptions about 32-bit code. However, Microsoft should have been fully aware that 64-bit computing was coming a decade ago when it was doing its work on porting NT to the 64-bit Alpha and again in its efforts to port Windows to the Itanium IA-64. Why the great compromise of tacking on partial 64-bit support as an afterthought today?
Some have accused Microsoft of using an oddball, legacy-limited version of 64-bit computing as a way to maliciously break interoperability with 64-bit Linux. Whether Microsoft’s intent was actually the result of malice or just plain incompetence, Apple chose the opposite path for its 64-bit strategy: Leopard and Snow Leopard use the same LP64 model as the 64-bit versions of Linux, SGI IRIX, and other commercial distributions of Unix. That ensures broad compatibility with the 64-bit applications and libraries already available.
Representatives of groups with expertise in 64-bit computing, including Digital, Hewlett-Packard, IBM, Intel, Novell, NCR, the original Santa Cruz Operation, Sunsoft, and X/Open delivered a joint explanation of why LP64 is a better model for the future of computing than the model Microsoft chose in 64-BIT PROGRAMMING MODELS. The short answer: LP64 supports easier porting of existing code, interoperability between 32 and 64-bit computing environments, industry standard compliance for cross-platform interoperability, better performance, and a smoother transition from existing systems.
And so while Microsoft struggles with the transition to 64-bits, Apple will be furthering its lead in deploying 64-bit computing to mainstream consumers in a highly interoperable, no compromise strategy that can backwardly support existing 32-bit hardware. For end users, Snow Leopard will simply make everything faster when running on the latest 64-bit hardware.
With all the effort Apple is pouring into the future of desktop computing, the idea that Apple is dropping focus on the Mac for the iPhone makes the third myth of Snow Leopard easy to unravel, as the next article will do.
Myths of Snow Leopard 3: Mac Sidelined for iPhone
[Update: Warren Gish forwarded the following comment on PowerPC and 64-bit computing in Snow Leopard:
PowerPC is being dropped from Snow Leopard because there is no similar performance advantage with the PowerPC architecture in going 64-bit as there is in moving from x86 to x64. X64/AMD64 offers twice as many general purpose registers as x86, and that's where virtually all of the performance boost derives. The performance gain usually offsets any performance loss associated with using larger data items by ~15% but not uncommonly by as much as 25%.
Not the case with PowerPC. The number of general purpose registers is unchanged between 32-bit and 64-bit PPC, so applications are left with the performance loss of using larger datums in 64-bit mode. As a result, PowerPC apps typically run a little slower in 64-bit mode than in 32-bit mode.]
WWDC 2008: New in Mac OS X Snow Leopard
Myths of Snow Leopard 1: PowerPC Support — RoughlyDrafted Magazine
Myths of Snow Leopard 2: 32-bit Support
Myths of Snow Leopard 3: Mac Sidelined for iPhone
Myths of Snow Leopard 4: Exchange is the Only New Feature!
Myths of Snow Leopard 5: No Carbon!
Like reading RoughlyDrafted? Share articles with your friends, link from your blog, and subscribe to my podcast! Submit to Reddit or Slashdot, or consider making a small donation supporting this site. Thanks!