Confused about 64-bit programs

Discussion in 'macOS' started by rawdawg, May 8, 2010.

  1. rawdawg macrumors 6502

    Joined:
    Jan 7, 2009
    Location:
    Brooklyn
    #1
    Hello and I apologize in advance. I'm sorry but I searched around and am still unsure.

    In an older thread here I saw in order to take advantage of 64bit programs you need to restart Snow Leopard in 64-bit by holding down 6 +4 while rebooting (or changing a preference somewhere). I remember doing this awhile back but it made my eSATA card not work (even though it's the very best one available for my 17"uMBP summer 09', the Sonnet Tempo Pro).

    Now that CS5 is out and everyone is excited about PS and AE being 64-bit, has something changed or do we still have to reboot as described above in order to take advantage of this ability.

    Unless I'm completely off here I imagine many of those excited about 64-bit didn't realize you had to do that. Can someone please explain this to me? Also, do you still have to hold 6 + 4 at bootup?
     
  2. TuffLuffJimmy macrumors G3

    TuffLuffJimmy

    Joined:
    Apr 6, 2007
    Location:
    Portland, OR
    #2
    You never had to restart holding 6 and 4 to take advantage of 64-bit in Snow Leopard, that's just how you boot into a 64-bit kernel (unnecessary).
     
  3. rawdawg thread starter macrumors 6502

    Joined:
    Jan 7, 2009
    Location:
    Brooklyn
    #3
    As you can see I'm way off.... When I bought my MBP and upgraded to Snow Leopard I swear I thought I read that somewhere here. You say that is how you boot into the 64-bit kernel, could someone briefly explain what that means (versus a 64-bit program)? TuffLuffJimmy says that is unnecessary but I'm confused what the difference is and how it effects 64-bit programs. I can't find the thread I was referring to earlier but I thought it stated something to the effect that unless you boot into a 64-bit kernel you can't take advantage of 64-bit programs.

    I know I'm wrong, just asking for guidance if it's not too much trouble.
     
  4. TuffLuffJimmy macrumors G3

    TuffLuffJimmy

    Joined:
    Apr 6, 2007
    Location:
    Portland, OR
    #4
    Don't worry. I don't understand it completely either. I think a 64-bit kernel really isn't very different from a 32-bit kernel, except the kernel is now processed in 64-bit code instead of 32. I don't think there are any major performance benefits from this. A 64-bit application, however, can address more RAM than a 32-bit process and can be executed in less time if coded properly, because 64-bits are being processed at a time instead of just 32.

    At least that's my understanding of it. Anyone with a bit more knowledge want to chime in?
     
  5. Nermal Moderator

    Nermal

    Staff Member

    Joined:
    Dec 7, 2002
    Location:
    New Zealand
    #5
    I also don't fully understand it, but the impression I got is that it's not really important for current hardware but will be more useful in the future. The option is there now so that developers can test apps using the 64-bit kernel, as there are currently many apps that don't run under the 64-bit kernel.

    You can run 64-bit apps under the 32-bit kernel without issues.
     
  6. rawdawg thread starter macrumors 6502

    Joined:
    Jan 7, 2009
    Location:
    Brooklyn
  7. zwaldowski macrumors member

    Joined:
    Aug 15, 2009
    #7
    Here, I'll explain it. :p

    The Mac OS is segregated into the kernel level and the userspace. The kernel, called Darwin, has long supported running executables of many architectures. Rosetta takes advantage of this, as do the system utilities "lipo" and other compile-time cross-compilers. OS X has a UNIX userspace with some GNU utilities that has "hybrid" functionality. It's compiled for all three architectures at once and the kernel decides which architecture it would run best with at runtime.

    The kernel - and this is true on all computers - is the heart and soul of the OS. It interacts directly with the hardware, schedules how applications get CPU time and RAM use, and basically assures everybody and everything is playing nice. Though it can technically run all sorts of executables (32-bit, 64-bit, and PowerPC), the kernel has to be compiled contiguously as one architecture because it couldn't otherwise do anything: for everything else on the system, the kernel decides which version your processor can run best. There's nothing to do this for the kernel.

    The practical upshot of all this (especially for Leopard users in 2007) is that you could run 64-bit applications; you could therefore take advantage of all the new 64-bit optimized stuff (see Clang), the higher memory, and the latest additions and innovations in Cocoa (not to mention no longer having Carbon!). In Leopard, the kernel was still only 32-bit to avoid any driver troubles (something that constantly plagued Microsoft's early 64-bit Windows , which is why Windows 7 is still 32-bit in consumer boxes with the online-orderable 64-bit edition); with that, Apple sent out the klaxon call that future OS' would take advantage of 64-bit. Since then, more and more manufacturers and developers have released their drivers in 64-bit. Apple enabled 64-bit kernel - but not by default - in Snow Leopard and will likely go 64-bit-only in the next release.

    For now? Do what you can to use 64-bit applications. Not only are they guaranteed to be newer, using the 10.5 SDK, without Carbon, etc; they also can take advantage of hardware stuff. I, personally, run the 64-bit kernel because I perceive a speed boost that is likely not there. :D Right now, it really doesn't matter what bittage your kernel has; it does, however, matter what your app has. Some developers have reported that compiling an app for 64-bit using the Clang LLVM compiler can give 30% faster code just for basic stuff; that doesn't even get in to memory and/or CPU intense stuff.

    Sorry wall of text poster is sorry. :rolleyes:
     

Share This Page