High-Level Analysis of iPhone OS 4.0 Multitasking

iPhone OS 4.0

Apple recently announced iPhone OS 4.0 enabling “multitasking” of a sorts. I want to dig slightly deeper into understanding what they actually mean by this “multitasking”, without talking too much about the nitty gritty details.

There are 7 kinds of “services” they expose for multitasking:

  • Background Audio
  • Voice over IP
  • Background Location
  • Push Notifications
  • Local Notifications
  • Task Completion
  • Fast App Switching

Among all 7 “services” exposed, 6 of them are somewhat already available in the system itself, one way or another, with hidden APIs not exposed for public developer usage. Let’s take a look at each of them, and how they might “save battery” without “slowing down the system”.

Background Audio

The background audio is simply what the iTunes application already does, which is to play audio in the background without having the iTunes application open. This simply means they just expose what iPhone can already do to developers. This does not make any changes to slowing down the system in any way, since people have been using the iTunes application to play background music since the first iteration of the iPhone and iPod Touch. However, understand that the application does not remain open at all, only a small portion of the “application” remains streaming the music.

Voice over IP

Voice services has been around ever since the beginning of the iPhone (duh?!?) with the Phone application, running constantly in the background to “receive” calls. This, in fact, is also not a full fledged application at all, but a small part of code that “reacts” to an action by the OS (namely the voice service) to load up the application and “receive” the action to do something about it.

Background Location

Similarly with the voice service, it is simply a “reaction” or a “response” to an action that the OS has prompted, in this case, your GPS or Wifi location based services. This is probably one of the things that will drain your battery pretty quickly, since these services do take a lot of resources. However, since the control lies with the OS of how and when to serve up this reaction and NOT the application that decides to take over your entire GPS and Wifi location based services into their hands and drain your battery dry, the OS will probably have some battery consideration when location is required, hopefully not letting the application go rogue.

Push Notifications

What can I say? It’s been done, and been available since the last iPhone OS 3.0 release. I think it’s just put here for good measure. Once again, it is a “reaction” and not true multitasking.

Local Notifications

This is simply the same thing as your “scheduled task” or “timer” for those familiar with the terminologies. This, too, isn’t having your entire application open, but simply just a small part of it that you register to a scheduler to run it when required.

Task Completion

This is slightly interesting because it isn’t a “reaction” to something, but letting a “thread”, “process”, or keeping with this post’s terminology “a small part of the app” running in the background, and when that finishes it just automatically closes the application. This has potential for having a rogue application that simply just continuously have an infinite loop to keep the application open. I’m curious to find out how much is exposed, or only certain services like “downloading” and “uploading” are available.

Fast App Switching

This is ALSO not true multitasking, where the application once lost focus will save its state, close itself, and not “run” at all. Only after reopening, the state is restored, and the application is once resumed again. So in fact, anything running will have to be resumed, for example connection to the internet and so on. This means that it does not actually continue to run at all. However, with what was covered in the previous 6 ways of multitasking, you can very well achieve seamless “multitasking” with “Task Completion”, “Local Notifications” and so on.


What does this all mean? Steve Jobs has redefined what multitasking actually means and converted the meaning to a consumer terminology. Consumers do not want true multitasking, but a pseudo-version of it with all the benefits of multitasking, and also the benefits of a fast and responsive OS. But does this mean that developers will have more to worry about, trying to work around what’s available to them to create a seamless so-called “multitasking” application? Most of what Apple has announced isn’t anything new at all to the iPhone OS, it is simply just exposing it with a tight grip, disallowing developers to go rogue.

Do note that all this right now is speculation based on what makes sense to me until I actually see the SDK.

Source: JustinLee.SG – High-Level Analysis of iPhone OS 4.0 Multitasking

  • NTT

    Very well summarized Justin!.

    For the Task Completion, I would be interested to see what type of tasks are allowed to complete in the background. I am sure it’d be pretty restricted (they surely won’t let you complete a recursive task in the background). They will definitely have time-outs as well. So I don’t see infinite loops as an issue.

  • Hey Justin great round up there. Like the portion on SJ redefining multi-tasking, and may I add it’s truly mobile multitasking since our attention span on these mobile devices is shorter; hence we might not need programs to run full blown simutaneously. By the way would you guys be covering an iPad review/unbox?

    • Hahaha… Stay tuned to our twitter account 😉 We have something up our sleeves 😛

  • Thanks Alan. That’s true. But I’m very sure most multi-tasking can be done without the true sense of what we computer scientists define multi-tasking as.

    Well, if someone would like to loan us their iPad, we can review/unbox it soon enough. 🙂 But yeah, like Daniel said, we *might* have something up our sleeves. Just follow our twitter account @tech65.

  • Hey I have an ipad and had been using for 2 weeks now… we can sit down for a quick review if you guys wanna. Shifting house this week though… buzz me if you guys want a see/look. Cheers

Justin Lee
A weird, passionate geek for technology with an undying love to pick at every flaw that will hopefully improve technology all around. Owns a lovely MacBook Pro with 8gigs of ram, involved intimately with Linux and works closely with Microsoft technologies. Wants to own an iPhone 4, owns an HTC Hero Android phone, Nexus One, once owned an iPhone 3g, still owns a 1st gen Sony Ericsson W800i. A coder of many languages, from Haskell to C#, from F# to Ruby. A jack of all technology, a master of one. Motto is "Taking over the world with every line of code". To contact me, email justin at tech65 dot org or check out my site justinlee.sg.
more blog posts
Dolby Atmos - A Review
65bits #298: The Week of the Really Weird News
65bits #290: iPads, Macs, Windows and a Chromebook.
Review: LG Optimus 4XHD
iPhone 5 Pricing on Contract
CommunicAsia 2012 Opens
First Looks: Toshiba Satellite P850
© 2011 Tech65 Some Rights Reserved