iPhone OS 4.0: An Elegant ‘Multi-tasking’ Approach

Share this:

A friend of mine said to me on the night when OS 4.0 was announced, “The 4.0 changelist better be as long as 3.0’s changelist”. Well, we here at +8 GMT timezone would obviously not be able to attend the party at Cupertino, but thanks to the bunch at Gizmodo, I was getting updated on their live feed. I think there was a mention of close to 100 new features on iPhone OS 4.0.

But I think the top feature that’s gotten everyone excited is the ability to Multi-task. There’s a whole bunch of stuff around the web on how it’ll work, such as the ones posted at Gizmodo. I’m not going to repeat them at length here so just Google and find out yourself how it would be like to multi-task on the new iPhone OS. Instead, I’d share my views on Apple’s implementation of multi-tasking. As you’d probably noticed on the title of this blog post, I think it’s an elegant approach indeed.

Sure. Apple’s never the first in anything. In fact, they’ve probably more innovators that inventors. And there’s not a bad thing at all. As Steve Job has put it, it’s not about being first in doing something, it’s about doing the best at something. Indeed, IMHO, this is probably one of the creative way multi-tasking can be implemented.

With multi-tasking, the OS would need to have a mechanism to manage background tasks and memory state. The problem with this is while it’s easy to multi-task on a modern day notebook or workstation with abundant persistent storage (HDD) for swap files and gigabytes of RAM, your regular iPhone 3GS just runs with a mere 256MB of RAM. It’s even worse on the iPhone 2G and 3G which only has 128MB of RAM. Wait a minute, isn’t it all about battery life as Stevie said it was? Well, I think Apple always has an elegant way of explaining anything to the masses. 🙂 And with a search through the web, it seems that I’m not the only one that thought the same. Otherwise, why wouldn’t multi-tasking be supported on all the older devices which only had 128MB of RAM.

iPhone 2G, 3G: ARM 11 @412 MHz, PowerVR MBX Lite, 128 MB RAM
iPhone 3GS: ARM Cortex, 600 MHz, PowerVR SGX, 256MB RAM

Whatever the actual story is at Infinite Loop, at the end of the day, it’s the results that matter. It’s just unfortunate that it’s only for the iPhone 3GS, the 3rd Gen iPod Touch, the iPad and iWhatever-else-that-has-yet-to-be-released.

While I’m not sure if the 7 multi-tasking services that the iPhone OS 4.0 SDK exposes would be sufficient till I’ve seen it in action, I love the fact that the OS would be handling any of the background services when required by the applications. No need for any sort of task management as the OS itself would handle it for you and for the app. As such, there’s no need ever to leave an application fully running in the background thus saving a good amount of CPU cycles.

I can say this with full conviction as I’ve recently jailbroken my iPhone (which warrants another post on why I did that) and have been playing around with Backgrounder, a hack extension that allows me to run apps in the background and thus multitask. Based on my initial experience, backgrounder is cool and allows me to switch between apps without losing any sessions at all. This is perfect in situations when I need to chat on IM+ and administer our servers with iRDesktop for example.

But the catch is that you’ll need to either configure Backgrounder to only be enabled on certain apps using a combination of general settings and overrides, or stick to the default of activating and deactivating Backgrounder manually per app when you need it. Which means, this isn’t quite the elegant solution you’d hope for. And if you do forget to disable Backgrounder for CPU intensive apps, well I hope you have a battery extenders close to you.

With the iPhone OS 4.0 getting close to the release date (WWDC hopefully!!!), we should be seeing a whole slew of apps that would natively take advantage of this multi-tasking capability. And it should be quite exciting to see what these new apps would do with this new capabilities.

Share this:

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.