tags:

views:

208

answers:

3

Does iPhone OS use the Mach kernel? Which one exactly? Are there somewhere interesting informations about the deep internals of iPhone OS? Where should I start?

I want to understand the internals of iPhone OS as deep as possible before I start thinking about how to get my app work the right way. Performance sucks so much, and I want to know why. Exactly.

+1  A: 

I know this does not answer your question, but, did you try running/debugging your app with Instruments? It gives you very detailed information about your iPhone running process.

Pablo Santa Cruz
You mean I could use Instruments to figure out how those internals of iPhone OS work? Sounds like a horrible research oddyssee. I would prefer to just read it somewhere since I expect such information to be available to developers. At least I hope it is. Otherwise this kind of brute-force stuff would be the only way to find out...
HelloMoon
No, I meant you can use Instruments to detect performance bottleneck on your application. It won't give you specific information about iPhone OS' mach kernel. That's why I started my answer with "I know this does not answer your question..." :-)
Pablo Santa Cruz
+9  A: 

Not to be mean, but if your performance sucks, knowing the internals of the Mach kernel aren't going to help you much - they're pretty much implementation details you shouldn't know or care about.

I've done optimisations of my app that brought scrolling speed from around 2fps to being buttery smooth and so on, and I don't know squat about how Mach works.

To optimise, use Instruments as another poster mentioned. Read the Instruments User Guide. Then read it again. It's hard to get your head around at first, but it's a hell of a lot simpler, and much more useful, than learning how Mach works.

Finally, please stop posting multiple questions about how Mach works with slightly different wordings. Posting a ton of questions like that won't help you find what you want.

iKenndac
+1 for the last paragraph
Sixten Otto
In addition, he may wish to look into Shark, which nicely complements Instruments when doing performance tuning on the device. And yes, 10 slightly different questions on multithreading within a day is a bit excessive.
Brad Larson
ya, start from the top down, not the other way around
pxl
+4  A: 

The deep and explicit internals of the iPhone kernel are Apple proprietary. Precise, detailed information on the kernel are not made available to developers, and are highly subject to change from release to release (and generally are not needed). That said, it is based closely on Mach, and so knowledge of Mach is your best place to start understanding what is public about the iPhone kernel internals. Learning the Mac kernel will of course give you even more insight, as it is likely closer to the iPhone kernel. But again, the Mac kernel internals are internals and so are not publicly available, and would not be appropriate to base your code on even if they were.

If your problem is performance, carefully tuning an application to the current kernel implementation is very fragile, and extremely unlikely to give you the kind of performance improvements you need. As mentioned several times, Instruments is your best way to tune your code to determine what in your code is most inefficient (and almost all major performance problems can be resolved in userland code). If you have not spent substantial time in Instruments getting your code to be as perfect as possible, you are far ahead of yourself looking at issues with the kernel.

Rob Napier