$bbtitle
Apple Stock: 199.92 ( -0.59 )
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 $280 on new MacBook Pros and up to $165 on brand new iMacs with special coupons: Mac Pricing Guide updated Nov 20th (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 ] 


Download Parallels 5.0 Today
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
Apple's App Store approval process gets partially automated
TomTom to release iPod touch-specific GPS car kit
China Unicom expects 10% of 3G users on iPhone in 3 years
Steve Jobs e-mails terse response to upset Apple developer
Hack re-enables Atom processor compatibility for Mac OS X 10.6.2
Microsoft shareholders grill CEO about Apple, iPhone
Google outlines Chrome OS plans for netbooks
Sony announces iTunes competitor for music, movies, books
Apple investigates space-age fitness tracking technology
Web search statistics show Bing stagnant, Google growing
New apps said to make iPod touch more prominent in Apple stores
Piper: Apple tablet no more than $700, launch timing irrelevant
Major publisher preps for Apple tablet as delay, OLED rumors surface
AT&T faces setback in legal battle over Verizon ads [u]
TomTom app updated to support iPod touch, first-gen iPhone
Oct. estimates suggest Apple will sell 2.9M Macs this quarter
Microsoft retail store gets odd viral marketing buzz
Rumored 'Google Phone' said to be coming in 2010
Evidence suggests Apple at work on Mac OS X 10.7
iPhone approved in South Korea; China Mobile talks continue
AT&T upgrades network as wireless traffic quadruples over past year
Apple store in upscale Greenwich, Conn., to open Saturday
Needham downgrades Apple stock on technicality
Verizon rumored to embrace Palm in 2010 to combat iPhone
Apple's iPhone App Store takes off in China
Belgian heist lands thousands of stolen Apple iPhones
Verizon responds to AT&T in court: 'The truth hurts'
Apple said to release iPhone app for in-store appointments
OnLive cloud gaming service demonstrated on Apple's iPhone
Apple tablet speculation: high-end graphics, several models
Microsoft looks to combat Apple globally with Zune content
Apple met with AdMob weeks before acquisition by Google
Apple earns key legal victory against Psystar
Apple looks to hire AAA game developer for in-house iPhone team
Apple's next-gen iPhone power amp; NASA chemical sensor app
Bill Gates praises Steve Jobs for saving Apple
AT&T responds to 'false and misleading' Verizon ads
Apple unveils browser-based iTunes Preview
AT&T asks court to pull Verizon's 'misleading' iPhone ads
Conflicting reports within Qualcomm suggest Verizon-only iPhone

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.