Slashdot Mirror


Understanding OS X Kernel Internals

jglidell writes "The OS X kernel has been in the news alot this past year, whether it's why its slow, Mach/micro-kernel makes it bad, it's going closed source and what not. Amit Singh has put up a new presentation on the innards of OS X. It does a pretty good job of summing up the OS X kernel architecture, and has some pretty detailed diagrams... for instance they show that there are so many process/threads layers in OS X. So if you are in the mood for doing some OS studying then head over."

12 of 199 comments (clear)

  1. Needs more editor. by dajobi · · Score: 4, Insightful

    "alot"
    "whether it's why its slow"
    "they show that there are so many process/threads layers in OS X."

    Do the editors even look at submissions any more? Or to put it another way, is our children learning yet?

    1. Re:Needs more editor. by OECD · · Score: 5, Insightful

      Do the editors even look at submissions any more?

      I'm afraid they do. I think the problem is that they're not as skilled in writing english as they are in writing PERL. (That's not a slam, by the way. I suck at PERL.)

      And before anyone goes on an "Off Topic" jag, it really does make a difference if the readers can understand what's being written. I stumbled over the "that there are so many" sentence a couple times trying to make sense of it. There are so many process threads layers in OS X that what? It slows it down? It's hard to program? Or is there simply a gee-whizz lot?

      Yeah, I know, I'm off to R the FA. I just wish I had a better idea of what's in there.

      --
      One man's -1 Flamebait is another man's +5 Funny.
    2. Re:Needs more editor. by gowen · · Score: 5, Funny
      I think the problem is that they're not as skilled in writing english as they are in writing PERL.
      I've seen slashcode.

      I think the problem is that they're exactly as skilled in writing english as they are in writing PERL.
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
  2. Where are good internal docs? by thogard · · Score: 4, Interesting

    I have a small program that mmaps a bit of code and then points the program counter at it. Everything runs fun until a OS call happens. I've heard that Mach allows user land programs to install their own OS calls but I haven't seen any example code to do it and I suspect such a feature isn't in OS X. I've hunted through the source and I while I could write my own system call and compile it in, there should be an easier way. Can anyone point me in the correct direction?

  3. Re:Spelling by dhasenan · · Score: 4, Insightful

    Not to mention fonts. I can never forgive anyone for using Comic Sans in a presentation.

  4. Re:Spelling by mangu · · Score: 5, Funny
    "alot" isn't a word! It's "a lot."


    I also get kinda pissed off because lotsa people write it that way.

  5. "OS X is slow" claims investigated by Logic+and+Reason · · Score: 5, Informative

    Before anyone starts spouting off again about Mac OS X being "slow by design" or somesuch, read this article by an Apple engineer that investigates those claims.

    1. Re:"OS X is slow" claims investigated by jcr · · Score: 4, Insightful

      It shows how the author completely misses the criticism that he is trying to address and fails miserably in his arguments.

      It does nothing of the kind. Read the whole article, and ALL of the comments, sparky, not just the ones that support your prejudice.

      Peter's point is that the "benchmark" in question boils down to how quickly OSX will malloc and free 35KB blocks. It happens to cross the mmap() threshold for kernel versus heap allocations.

      It also shows how Apple fanboys applaud the author's explaination, even though they haven't a clue about the subject matter - and even admit it in their posts.

      If you had actually refuted anything that Peter had said in his article, you might have a leg to stand on, but since you didn't, and since you toss off an epithet like "fanboy" instead of doing so, I conclude that you are the clueless one.

      No wonder you're an AC.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
  6. Ad by AstrumPreliator · · Score: 4, Informative

    I looked at the "presentation" and no, it doesn't do a very good job of explaining anything. Maybe combined with an extensive lecture to explain what the hell he's talking about would make it a bit more clear. From what I saw it was basically just enumerating the different components. Then I noticed the second to last slide. It's basically an ad for a book coming out.

    Maybe it's just me though. Did anyone else find it extremely enlightening?

  7. Underpowered Little Machine by Beefslaya · · Score: 5, Insightful

    As the purchaser of a brand new Core Duo Mini, (my first Mac, I feel "as happy as a little Gurlll!") I noticed that my system out of the box with 512 of RAM was dog slow when you start loading iPhoto, or any more then 2 apps.

    Initial startup yielded a smoking fast web browser, and other single line items.

    I purchased the 2GB Ram upgrade (not from Apple at 600 USD, 280USD from Crucial) and I noticed such a difference, that I couldn't understand WHY they would even consider shipping that little silver wonder with less then 1GB of RAM.

    It's not the kernel, it's the apps... They just don't give enough power to the off the shelf machines to support the great apps that come with it.

    Vive le Mac... Thanks for putting excitement back into computing for me.

    1. Re:Underpowered Little Machine by caseih · · Score: 4, Interesting

      I think much of OS X's ram-hungriness comes from the fact that outside of the system frameworks, there is very little utilization of shared libraries among the different applications. Each app bundle is largely self-contained with its own shared libraries. Granted most apps that ship with OS X (from apple) just access the shared frameworks in /Library/Frameworks and have few other dependencies in their bundles. But start adding apps like MS Word, Firefox, OpenOffice, etc, and you'll start having multiple copies of various libraries loaded. The app bundle system is very simple and reliable, but because of the shared library issue, you'll always need more ram when running these apps on OS X than Windows or Linux.

      Definitely 1 GB is a minimum amount of RAM needed for OS X Tiger these days. That is quite sad when you think about it, but RAM is cheap so I'm not too concerned about it. Apple has always shipped their machines short on RAM, hoping you'll pay ridiciulous amounts of money for their official RAM upgrades.

  8. Closed? by ShadowBottle · · Score: 5, Insightful

    Riiiight. Just because some idiot alarmists say that the kernel has gone closed when it simply just hasn't been released yet, the media and clueless bloggers start crying that it's gone closed source.
    "Well... it hasn't. It's still open. IT JUST HASN'T BEEN RELEASED YET.
    OSNews is reporting that Ernest Prabhakar, Apple's Open Source and Open Standards product manager, has stated in the Fed-Talk mailing that Apple has not actually closed Mac OS X's Darwin kernel for the Intel version of the OS; they simply haven't released it yet. Speculation about Apple closing the kernel arose from the fact that other non-kernel Darwin sources actually have been released, and the previous PowerPC-based kernel is still available as open source as well.Ernest wanted to make sure that tech media didn't confuse 'speculation' with 'fact'. A good lesson we all could benefit from...."

    God damn alarmist idiots.