Robert Love on iPhone OS 4 and Multitasking

Google Android engineer Robert Love:

As I stated in my previous post, the real concern with multitasking on an embedded, swapless device is memory consumption. Battery life is a straw man. So how do services solve the memory consumption problem? Alone, as described in the event, they don’t. But iPhone OS will continue to kill applications that leave the foreground. Thus, applications will need to be refactored into a client and server pair: a user-facing application that only runs when in the foreground and a background service. The point being, services have a small memory footprint and they are limited in number. Without the risk of unbounded multitasking, this greatly relieves memory pressure.

I think his overview of how multitasking works on iPhone OS is the best I’ve seen, and a decent layman’s explanation. And he’s absolutely right that the biggest constraint is RAM — that’s why older iPhones and iPod Touches are cut off from these features.

Update: Some of his specific technical guesses are wrong, though. This statement, for example, is flat-out incorrect:

Thus, applications will need to be refactored into a client and server pair.

Monday, 12 April 2010