$bbtitle
Apple Stock: 140.02 ( -2.81 )
RSS RSS Twitter Twitter
Search:
AppleInsider.com Archives News Bytes Reviews Anonymous Mailer Submit Story AppleInsider Forums Mac Prices Polls Advertise on AppleInsider Contact AppleInsider
Save up to $250 on new MacBook Pros and up to $180 on new iMacs: Mac Pricing Guide updated July 3rd (Find the best prices on Macs).
Tuesday, October 28, 2008

Road to Mac OS X Snow Leopard: 64-bit to the Kernel

By Prince McLean

Published: 10:20 AM EST

Build notes leaked on the web of a prerelease version of Mac OS X 10.6 Snow Leopard indicate that the software only supports enabling its new 64-bit kernel on certain machines, including the Xserve, Mac Pro, and MacBook Pro, but this does not mean Snow Leopard's kernel will be limited to 32-bit operation on consumer machines.

Instead, it means that the early developer build of Snow Leopard does not yet supply 64-bit kernel extensions for some of the critical components of the MacBook and other consumer machines. When released to developers around spring and to end users a few months later, Snow Leopard will support using a 64-bit kernel on all Intel Macs with 64-bit CPU, such as the Core 2 Duo.

A 64-bit kernel requires all of its extensions to also be 64-bit. Kernel extensions or KEXTs include drivers for audio hardware, graphics adapters, networking, certain printing components, and other devices on the logic board or attached as peripherals. Until Apple delivers 64-bit versions of the nearly 300 extensions it ships with Mac OS X (not all of which will need to be supported on 64-bit Macs; many are legacy), it is limiting official 64-bit kernel support to a subset of Macs in prerelease builds of the new operating system.

The 32-bit kernel of Mac OS X

Snow Leopard will deliver the first 64-bit kernel for Mac OS X. Earlier versions of the operating system, including today's Leopard, can run 64-bit software but do so using a 32-bit kernel. More accurately, whether running on 32 and 64-bit CPUs, Mac OS X loads the same kernel image and run it as a 32-bit process, although when run on 64-bit hardware, the 32-bit kernel switches into "long mode compatibility mode."

Apple's current implementation allows the existing 32-bit kernel to run both 32-bit and 64-bit applications at once, as well as being able to handle 64-bit virtual memory allocations, giving 64-bit applications and background tasks the capacity to allocate memory spaces larger than 4GB when working with large data sets. In Tiger, 32-bit graphical apps could create a 64-bit process; under Leopard, Mac OS X can run full 64-bit graphical apps.

Leopard's 32-bit kernel has been fitted with enhancements that handle copying between 32 and 64-bit user address spaces, and its syscall and trap handlers are also 64-bit code. This hybrid design enabled Apple to deliver a kernel that could run 64-bit apps without needing to immediately deliver 64-bit kernel drivers for it, nor to require third parties to all ship 64-bit versions of their drivers.

As described in earlier coverage of Snow Leopard's 64-bit features, Mac OS X can also currently use various techniques to use more than 4GB of installed RAM, the limit imposed by 32-bit memory addressing, despite using a 32-bit kernel. Intel's hardware uses a method called PAE to enable certain Mac models to address as much as 32GB of installed RAM, despite Mac OS X's use of a 32-bit kernel.

Apple Earnings


The 64-bit kernel of Mac OS X Snow Leopard

Having a 64-bit kernel will enable Apple to move well beyond PAE to address very large amounts of installed RAM in Macs of the future as memory becomes more affordable. This is particularly useful for servers, but even consumer machines will someday need vast amounts of RAM.

Additionally, the new 64-bit kernel will gain the advantages that 64-bit Mac OS X apps already have: the ability to set up an address space for itself greater than 32-bits (4GB), as well as the ability to access the full x64 register set of 64-bit CPUs. This wasn't as compelling of a need on the 64-bit PowerPC G5, but 64-bit Intel CPUs like the Core 2 Duo provide more general purpose registers that are conspicuously absent on 32-bit Intel CPUs, leading to a significant performance advantage when moving to 64-bit software.

Along with these advantages comes the necessity of upgrading all of the kernel's drivers to 64-bit, including any provided by third parties. Again, that's because 64-bit programs can't load and run 32-bit plugins, and vice versa. That means Mac users will need to do the same driver upgrade that Windows Vista users did.

Fortunately, Apple took steps to plan for the transition. By exposing 64-bit development tools and concepts years in advance, Mac programmers have had time to build a more mature understanding of how things work. If Apple had attempted to simply deliver a 100% 64-bit OS in one fell swoop, it may never have come together. Apple would have run into many of the same catch-22 problems that have held 64-bit Windows from gaining mass adoption.

Additionally, Apple only needs to deliver a relatively small number of drivers: just those devices used in Macs supported by the Snow Leopard release. Since Apple designed and built all those machines, it won't have nearly as tough of a time as Microsoft had in prodding third parties to deliver good 64-bit versions of their drivers for all the hardware anyone has every put into any brand of PC sold within the last several years.

Mac OS X and Windows x64 software

Apple also developed a clean 'fat binary' method for delivering cross-platform binary code, including both 32-and 64-bit versions in a single app bundle, or binary package. On Windows, 32-bit and 64-bit code has to be installed separately. Supporting library files on 64-bit Windows have to be put into System32 (if they are 64-bit) or SysWOW64 (if they are 32-bit).

This apparent contradiction relates to the fact that Microsoft couldn't change the name of the Windows System32 directory (originally named to distinguish it from the 16-bit System directory) for compatibility reasons, and that SysWOW64 is the 64-bit process that runs 32-bit Windows apps in a compatibility mode on Windows x64, called WOW64 for 'Windows on 64-bit Windows.'

On Mac OS X Leopard and in Snow Leopard, Apple designed the kernel to run both 32 and 64-bit software natively with no compatibility layer running, and all supporting files and libraries can be organized in the same application bundle. That means developers can distribute a single installer that works on any Mac, and that users won't need to make sure they've obtained the correct binary for their machine. This promises to go a long way in making the transition to 64-bit Mac software very smooth and virtually invisible to most users.

AppleInsider's Road to Leopard Series

Road to Mac OS X Snow Leopard: 64-bits
Road to Mac OS X Snow Leopard: 64-bits, Santa Rosa and the great PC swindle
Road to Mac OS X Snow Leopard: Twice the RAM, half the price, 64-bits
Road to Mac OS X Snow Leopard: The future of 64-bit apps

Filed under : Mac OS X 47 Comments ] 
Story topics: Mac OS X 10.6   Print ] [ Story Link ] 


(13") $1,094.00 (15") $1,579.00 (15") $2,089.00
(13") $1,394.00 (15") $1,799.00 (17") $2,249.00
See more prices in AppleInsider's Mac Price Guide
Mac Poker players can play Full Tilt Poker for Mac and get 100% to $600 free with bonus code MP600, courtesy of Online Poker Mac
AppleInsider Features
Hot Forum Topics

Recent Articles
Countering rumor says Apple and NVIDIA "doing just fine"
Breaking: shot fired, one wounded at Virginia-based Apple Store
First iPhone 3GS jailbreaking tool available for download
iPhone 3GS marked AT&T's "best-ever sales day"
iPhone overheating problems could see aid from new patent
Apple working to fix unreleased iPhone SMS exploit
Pesky Psystar to emerge from Chapter 11 with new Mac offering
Apple looks towards fingerprint-based multi-touch controls
Apple developing "active packaging" for iPods and iPhones
Apple may drop NVIDIA chips in Macs following contract fight
Apple covering all the bases with Mac OS X 10.5.8 betas
University of Florida's PharmD program to require iPod touch
Apple's Mac shipments rebounding sharply in recent weeks
iPhone Software 3.1 to deliver new video and Voice Control features
Apple posts iPhone OS 3.1 beta, SDK with new video extensions
White iPhone 3GS units discoloring from excessive heat
Maine's expanded MacBook program the 'largest of its kind'
Mozilla releases faster, safer, smarter version of Firefox browser
Dell working on pocket-sized Internet gadget
MacBook Air firmware updated to support replacement batteries
Apple sees brief iPhone 3GS shortages; NVIDIA intros CS4 plugins
Steve Jobs returns to work at Apple
Apple, other phone makers agree on standard charger for Europe
Apple posts new Snow Leopard, 10.5.8 seeds
iPhone marketing head goes to VC firm; iTunes breaks records after Jackson death
Briefly: more affordable iMacs from Apple expected by fall
Apple's latest high-end MacBook Air slower than predecessor
Apple's profit margin on Mac minis slimmer than usual
Apple ups stake in iPhone graphics chip designer
Windows 7 priced below Vista, to allow upgrades from XP
Mossberg: New MacBook Pro has best battery life "ever tested"
Apple sued over 'false' iTunes gift card promises
Proof-of-concept ports Leopard's icon stacks to iPhone (video)
iPhone 3GS spurs 400% increase in mobile video uploads to YouTube
Tidbit: Apple naming Leopard point release after ancient gods
Upgrade fee sees few iPod touch users updating to 3.0 software
Apple exploring wireless system for quantifying the unquantifiable
Bogged down AT&T 3G to clear in months; Buffett criticizes Jobs
Apple updates Apple TV, Remote app to allow multi-touch control [u]
Apple undersells, over-delivers on iPhone 3GS speed - report

AppleInsider Market Place

Sell your Laptop - working or not. Free shipping.: Get an instant online quote and sell your laptop today !

Believe in Office: Save Up To 25% on Office 2004 For Mac. Visit Our Site for Details!

IBackup - SMB Online Backup: IBackup is the preferred online storage and backup service of choice for SMBs for its ease of use, security and value. Offers automated backup and restore, file selection and securiy.

Download free software - everyday updated freeware files

 
Advertisements








AppleInsider RSS Feed
AppleInsider © 1997-2008
Please review our Privacy Policy.
Written/Edited/Compiled by the AppleInsider Staff.