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

Posted:
in macOS edited January 2014
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.







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
«13

Comments

  • Reply 1 of 47
    I cant wait!
  • Reply 2 of 47
    asciiascii Posts: 5,941member
    Nice diagram - shows the gradual approach Apple has taken. First the Unix layer, then the programming frameworks, and finally the kernel and drivers. It's good software development practice to do smaller releases and test them in the wild rather than do everything at once.
  • Reply 3 of 47
    Quote:
    Originally Posted by AppleInsider View Post


    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.



    Having only one installer that works for any Mac will make the transition so much easier. If you take an average consumer, they wouldn't know if they're running a 32-bit version, 64-bit version or whatever. So when they go to install an application, they have no clue what version to use.
  • Reply 4 of 47
    irelandireland Posts: 17,616member
    None of this stuff will compel "consumers" to upgrade to Snow Leopard. If Apple is going to offer this as a paid upgrade, and not free, there'll have to be several major obvious "new things". Cocoa touch?
  • Reply 5 of 47
    Quote:
    Originally Posted by themoonisdown09 View Post


    Having only one installer that works for any Mac will make the transition so much easier. If you take an average consumer, they wouldn't know if they're running a 32-bit version, 64-bit version or whatever. So when they go to install an application, they have no clue what version to use.



    This is also part of the reason why Microsoft's 64 bit strategy, (which is actually ahead of Apple's in terms of most implementation details), is such a colossal failure.



    The average user sees no reason to "switch" to 64 bit anything and will not jump through any hoops to do so. Having to install a completely separate version (64 bit) of Windows at a higher price, and then shop around for replacements for all the apps, while having the OS at the same time, look and act exactly the same is a big problem. It doesn't give the end user any reason to move to 64 bits, and at the same time erects some hefty barriers to them doing so.



    The Apple approach on the other hand just changes everything around in the background without the user even being aware of the change and provides actual benefits in terms of faster programs that work more reliably.



    Yet another case of the difference between having the end user as your customer (Apple) versus having the corporation as your customer (Microsoft).
  • Reply 6 of 47
    Quote:
    Originally Posted by Ireland View Post


    None of this stuff will compel "consumers" to upgrade to Snow Leopard. If Apple is going to offer this as a paid upgrade, and not free, there'll have to be several major obvious "new things". Cocoa touch?



    I'm sure if they think the sales will be lousy they'll talk about about how ridiculously fast it'll be on any Mac bought in the past 2-3 years. I, for one, will buy it for that. 64-bit combined with OpenCL should make my already quick computer noticeably faster. (Should is the key word there )
  • Reply 7 of 47
    Quote:
    Originally Posted by Ireland View Post


    Cocoa touch?







    I don't understand why you have to abandon all logic. How exactly is 'Cocoa touch' going to persuade consumers to buy Snow Leopard? Is it going to magically make their current displays multitouch-capable? Is the new Apple LED Display going to magically become multitouch aware? Just how is 'Cocoa touch' going to change a consumer's decision?



    If you're talking about buying a whole new system (hardware+software) that might use a new 'Cocoa touch' feature in Snow Leopard, then fine...but 'Cocoa touch' will *not* be an appealing feature to those who don't have the hardware that supports it.
  • Reply 8 of 47
    irelandireland Posts: 17,616member
    Quote:
    Originally Posted by bigmc6000 View Post


    I'm sure if they think the sales will be lousy they'll talk about about how ridiculously fast it'll be on any Mac bought in the past 2-3 years. I, for one, will buy it for that. 64-bit combined with OpenCL should make my already quick computer noticeably faster. (Should is the key word there )



    I know you will, but you are the type of person who reads and comments on AI, I'm talking about the people who use Macs for simple regular stuff. You know, people unlike us with real lives!
  • Reply 9 of 47
    irelandireland Posts: 17,616member
    Quote:
    Originally Posted by kim kap sol View Post


    I don't understand why you have to abandon all logic. How exactly is 'Cocoa touch' going to persuade consumers to buy Snow Leopard? Is it going to magically make their current displays multitouch-capable? Is the new Apple LED Display going to magically become multitouch aware? Just how is 'Cocoa touch' going to change a consumer's decision?



    If you're talking about buying a whole new system (hardware+software) that might use a new 'Cocoa touch' feature in Snow Leopard, then fine...but 'Cocoa touch' will *not* be an appealing feature to those who don't have the hardware that supports it.



    Well duh!



    And besides, Cocoa touch was one of the features. There could be, you know, others too.
  • Reply 10 of 47
    paxmanpaxman Posts: 4,603member
    Quote:
    Originally Posted by Ireland View Post


    None of this stuff will compel "consumers" to upgrade to Snow Leopard. If Apple is going to offer this as a paid upgrade, and not free, there'll have to be several major obvious "new things". Cocoa touch?



    I can't imagine Apple will charge for this. This is a significant step forward for Leopard - hence the name - but it is still Leopard. It will lay the foundations for the next v OS which will definitely be another $100.- or so. Should Apple pile on new usability features and eye candy for Snow Leopard, they can and will charge but otherwise its a geek update.
  • Reply 11 of 47
    Quote:
    Originally Posted by Ireland View Post


    I know you will, but you are the type of person who reads and comments on AI, I'm talking about the people who use Macs for simple regular stuff. You know, people unlike us with real lives!



    Wait. What? I have real life! I just play it out on the internet! Oh wait, damn... haha
  • Reply 12 of 47
    robb01robb01 Posts: 148member
    Quote:
    Originally Posted by bigmc6000 View Post


    Wait. What? I have real life! I just play it out on the internet! Oh wait, damn... haha







    _________________

  • Reply 13 of 47
    akacakac Posts: 511member
    Quote:
    Originally Posted by paxman View Post


    I can't imagine Apple will charge for this. This is a significant step forward for Leopard - hence the name - but it is still Leopard. It will lay the foundations for the next v OS which will definitely be another $100.- or so. Should Apple pile on new usability features and eye candy for Snow Leopard, they can and will charge but otherwise its a geek update.



    Isn't an OS basically a geek thing anyway? Users don't care about the OS, but its what runs everything and makes the Mac possible. From everything I've read, SL seems to be a very different OS from Leopard - but it looks the same. For some people they won't see the purpose of the upgrade. For others it will be huge. Just like Vista vs Windows 7.
  • Reply 14 of 47
    Quote:
    Originally Posted by paxman View Post


    I can't imagine Apple will charge for this. This is a significant step forward for Leopard - hence the name - but it is still Leopard. It will lay the foundations for the next v OS which will definitely be another $100.- or so. Should Apple pile on new usability features and eye candy for Snow Leopard, they can and will charge but otherwise its a geek update.



    Has there been mainstream speculation that they WON'T charge for Snow Leopard? I haven't heard either way.



    If Apple is putting in the time and money they'd put into a major release I'm impressed at the "no new features" spin. This industry has rushed so much crap to market, it would be a positive precedent to step back and clean up for once. But I think I'd only pay half the price of something like Leopard for Snow Leopard.



    Does anyone have concrete evidence that Snow has hooks for new touch functionality?
  • Reply 15 of 47
    Quote:
    Originally Posted by walshbj View Post


    Has there been mainstream speculation that they WON'T charge for Snow Leopard? I haven't heard either way.



    If Apple is putting in the time and money they'd put into a major release I'm impressed at the "no new features" spin. This industry has rushed so much crap to market, it would be a positive precedent to step back and clean up for once. But I think I'd only pay half the price of something like Leopard for Snow Leopard.



    Does anyone have concrete evidence that Snow has hooks for new touch functionality?



    Well there is some historical precedence that they won't charge unless they add notable new GUI changes (10.0 to 10.1 was a freebie as I recall). Other than pure speculation on the rumor sites I haven't seen anyone weigh in on the cost of it since it's such a small % of potential Apple revenue the Wall Street people don't seem to be too concerned about it.
  • Reply 16 of 47
    snafusnafu Posts: 37member
    Also, why pay for Snow Leopard if the SL-aware apps aren't there yet?. Until a smatter of killer 64-bit OpenCL-aware XYZ-whatever apps arrive, one could simply wait for OS X 10.7.



    Anyway, I am sure Apple will desperately try to invent some new eye-candy to justify the thing. In some ways, that's what happened to Leopard.
  • Reply 17 of 47
    Quote:
    Originally Posted by bigmc6000 View Post


    Well there is some historical precedence that they won't charge unless they add notable new GUI changes (10.0 to 10.1 was a freebie as I recall). Other than pure speculation on the rumor sites I haven't seen anyone weigh in on the cost of it since it's such a small % of potential Apple revenue the Wall Street people don't seem to be too concerned about it.



    10.1 was free only because 10.0 was so unusable, and it was a way of rewarding the people who really helped keep Apple kicking. Apple is doing fine now and doesn't need to give things away to keep customers. 10.5 is nothing like 10.0, so I see no reason why Apple should give it away.
  • Reply 18 of 47
    slewisslewis Posts: 2,080member
    Null.
  • Reply 19 of 47
    snafusnafu Posts: 37member
    A thing to point out about Vista 64: it seems many brand laptop manufacturers actually preinstall 64 bit versions of Vista for their users to be able to use all the preinstalled memory, get a faster system overall and better drivers. It makes sense that it is not a problem to configure them so, as they control the hardware components as opposite to what happens in the typical beige box. So, in a way, the thing gets more penetration in the consumer space that one would have expected.





    About Snow Leopard-aware killer apps, one would hope for a revamp of most of Apple's pro Apps. Also, one hopes OpenCL will allow for, first of all, taking advantage of plain GPUs for GPGPU tasks (instead of monster cards such as the Quadros) , and being able to fill a Mac Pro's bays with several of the lowest cost ones to build an OpenCL farm.
  • Reply 20 of 47
    Every day I get more and more persuaded to save up money for a Macbook and get the new OS that will come out. Windows 7 is so drab and uninteresting, plus the simplicity of one installer for both 32 or 64bit? Life is sweet.
Sign In or Register to comment.