2010/04/28

iPhone OS internals (part 2)

I'm still studying iPhone OS. I don't have an iPhone. I don't plan to get one (too expensive and annoyingly  closed). But I'm curious.

The iPhone OS Technology Overview give me some hint of the underlying software architecture of the iPhone OS. Yes, it's a Mach kernel. And everything looks pretty similar to Mac OS X, adapted to an embedded system (which means some compromise and too often hacking to fit everything in a smaller package). Everything in an iPhone OS runs with a root account (no other accounts seems to exist). I wasn't able to get the source code of Mach kernel used in the iPhone OS. Some packages of the OS are open source. The strict minimum to compile some C code, but not enough to build a viable OS.

One nice source of info is Daniel Eran Dilger's blog. It looks like he share some Apple gods secrets. Very informative, even if there's some gray area and it's dated of 2007.

Anyway, ARM programming is a world on it's own. I'm still wandering in XNU source code (of x86/ppc), trying to figure out how it works. I'm pretty sure there's a secret sauce in iPhone OS's Mach kernel.