iOS 4 Multitasking – A Question & A Wish List Item
Image Source: Gizmodo
iOS 4 has introduced a greater level of multitasking on the iPhone (3GS and 4) “ but it has not given us full-on multitasking as we see on desktop PCs, which is just not feasible on a smartphone yet.
This is one of the biggest and most eagerly awaited new features in iOS 4 and for the new iPhone 4. I ‘m as happy as anyone about this new functionality, but I also have a question about it and a big wish list item related to it.
My Understanding of iOS 4 and Multitasking
If my understanding is correct, what we ‘ve really got with iOS 4 is a tightly defined and limited amount of added genuine multitasking “ for very specifically defined services within certain apps (as shown in the screencap above) and a fairly elegant and simple execution of rapid app switching for all apps that are updated to take advantage of it.
So what we see when we open the iPhone ‘s Multitasking Bar is really a list of recently used apps, not necessarily all apps that are currently running in the background. The vast majority of apps (those that are not using one of the allowed services that truly run as a background thread/process) are in a ‘suspended ‘ or paused state, with their exact state remembered from when you last left them if they have been updated for iOS 4.
That ‘s my understanding thus far of things “ please correct me in the comments if you have better knowledge on this. Here is Gizmodo ‘s description of things from back when iOS 4 was first announced:
Apple claims their multitasking will save battery life and resources, unlike the competition. But how?
The reason is simple: This is not 100% true multitasking. Not in the sense that developers define it: All system resources are available to all applications, with the system assuming the role of a traffic controller, giving preference to some tasks and less preference to others as needed.
Free-for-all multitasking will consume way too many resources, especially memory. This will make the system choke, given the limited memory available in these devices. The CPU would also be taxed, and it would deplete the battery life quicker while slowing down applications running on the foreground.
Apple’s method, however, is quite clever: Basically, it allows you to pause applications ”like you can pause them in any UNIX-based operating system, while enabling some special services to allow some types of tasks ”like receiving calls or playing music ”to run on the background. There are seven kinds of services, and Apple says these will give the user the kind of multitasking they demand, but without choking the system
My Question
A lot of users of iOS 4 have concerns about battery drain with the new ‘multitasking ‘ features. It is worrying for many to see that the Multitasking Bar shows so many apps in it.
I would expect to see a hit on battery life and program memory (RAM “ not storage memory) when using an app like Pandora and letting music play in the background, or any other app that runs one of the allowed background services shown in the screenshot at the top of the post. My question is what level of resource hit is there from all other apps that have been launched since the last iPhone reboot? Or do ‘paused ‘ apps have zero impact on battery / memory used? (I just can ‘t see this being the case)
My Wish List Item
I think it would be great if we could choose which apps take advantage of the new background-paused functionality on iOS 4. I ‘d like it if we were asked as we are with Notifications “ asked just once to turn background suspension (or a nicer, shorter term) On and Off for each app.
There are a large number of apps that I use that I just don ‘t need to be suspended in the background, that I ‘m happy enough to see launched fresh when I go to them and I don ‘t need to rapidly switch to. Being able to turn these on and off like notifications would mean I ‘d never have to bother manually closing down these apps via the multitasking bar.
What Do You Think?
What ‘s your take on all of this? Would you like to be able to choose which apps are paused in the background? Or do you feel that these paused apps really don ‘t have any great impact on resources?

Though the most recently used apps are held in memory (if they support iOS 4.0), when the iPhone runs low on memory the least recently used apps are purged from memory and closed for real. You don't have to manually close anything; the iPhone automatically decides how many apps to keep frozen and which to close out (and the iPhone SDK guidelines say apps must be ready to be killed while frozen).
Yup, I'm aware of how the system is setup to shutdown apps completely when required. This is part of why I'm left with the question about what sort of resources are being used by 'paused' apps.
I was wondering why the multitask bar even shows apps that aren't using the feature. and i think having the option to choose which apps multitask or not would be awesome just like the push notification option menu.
I perfectly agreee with you……….. This current type of multitasking leaves a lonnnggg list of backgrounded apps which we forget to close and "possibly" remain running in the background, slowing the phone even if I dont need them to…….
I would like the option to turn multitasking off and on
I'm no expert, but I think you are a little confused.
"Suspending" an app — which is really just saving the state for fast switching back to it — does not use up any battery life, as far as I know. If an app uses one of the seven services that are available in the background, then it probably does use battery life. For example, pandora. I assume, however, that Pandora in the background uses the same battery life that the iPod running in the background would have used previously.
Also, you can disable background processing for apps on a one-off basis. You tap and hold on an icon the switcher tray, and then you can hit the minus sign to shut it down. The only time I have done this so far is with GPS apps. If you launch TomTom and then quit back to the home screen, I believe it continues to work in the background so that it can provide directions. As far as I can tell, the only way to shut it down is to tap the minus sign next to its icon in the switcher tray.
I'm aware of how you can manually close an app via the multitasking bar and in fact posted an article about it yesterday. I have not seen any place yet where it is clearly stated whether or not suspended apps utilize any memory or battery resources though. If you have, please share a link.
I believe they do. I've looked at SBSettings on my 3GS on iOS 4 and can clearly see 14 apps being held in memory at one time (leaving me with about 40 MB out of the 130 or so initially available). I very, very rarely experience any slowdowns, though.
I believe we, as the user of said device should have a choice of which apps I want in my 'multitask list'. So, umm, Apple, please add said feature, kplsthx
I like using Twitter and Facebook (from time to time), albeit, I don't think I want them running all the time. I like my battery for texting, and browsing forumslogs, etc, etc
No matter what, this "suspending" of an app probably uses power. The only two ways I could see of storing each app's state would be:
A) In RAM
B) In a page/temp file
Since it says that the least recently used app is deleted when memory is low, that means that the app must be held in RAM. RAM needs power in order to keep its current state, otherwise we would never have to boot up our computers. That said, there is SOME battery drain in multitasking, although the exact amount is likely small.
Regardless, I too would like to be able to choose what is "backgrounded." I was in Vegas this weekend and didn't have an iPhone charger. While killing everything except the phone via SBSettings was helpful, I felt like I had to go into the dock and quite all of the backgrounded apps, because when the iPhone battery is as bad as it is, every bit of juice helps.
Also, why can't I use YouTube "backgrounded?" I often use it to access music that I can't find elsewhere and it should be able to function like the iPod or Pandora.
What you've said on RAM and battery makes sense to me. Wouldn't it be lovely if Apple would document this somewhere? Maybe they have and I just don't know where to look I guess.
Apps using iOS4's multitasking ability stay resident in memory (the process remains, as can be seen with the 'top' utility). If the app only supports fast switching, it uses little to no CPU (again, as determined with top).
As for choosing which apps are allowed to multitask, this can be controlled with the latest version of Backgrounder (for jailbroken phones, of course). Backgrounder let's you choose, on a per-app basis, whether an app should be allowed to background, and whether it should do so using Backgrounder's method or the built-in iOS4 method.
I've used Backgrounder lots when I've run my iPhone jailbroken (and still do on the iPad) – but it doesn't help at all on a stock iPhone of course.
The multitasking bar should have a light under any app that has any background process running. As of right now we can't tell which apps are suspended and which have something running.