2010/04/08

iPhone OS Internals

As much as we can get a good knowledge of inner working of Mac OS X (see the excellent Mac OS X Internals), as much we must speculate on the iPhone OS. We guess that it share same root. After all, XNU and Mach could be ported almost "easily" to ARM platform. And many GNU and BSD tools could also be compiled/adapted for ARM (see NetBSD, OpenBSD and Debian ARMish ports for example). More work is needed for Core Services and Cocoa, but Apple got some of the best engineers, so they can certainly write driver kit code needed and adapt UI elements for those kind of screen/"gpu"/interface.

What mystify me is the general processes handling. In Mac OS X, as far a I know, theren't a master process with a higher priority and power of life and death over all other processes. But in iPhone OS, it seems so. Not all processes are created equals : phone and music process have certainly a higher priority over other app processes. And there's always something that kills bad/crash apps so the iPhone/iPod/iPad won't (or ain't) suppose to crash.

I would find quite intersting to get an inner knowledge, especially in the context of a complex OS on an ARM processor and the promise of multitasking in the coming version 4. But there's always Apple's scarecrows with their software licenses, NDA, patents, lawsuits and so on that makes it less appealing (at least if you don't like to mess up w/ authority or wear a black hat). We could instead take a look at the dying Openmoko, Java flavoured Google's Android or Intel oriented Moblin to get a taste of this kind of knowledge. But it's less appetizing than a red shinny apple...