WesleyFenlon : The Truth about Apple iOS Multitasking and Memory Management

8 01 2012

Mobile education consultant Fraser Speirs posted a blog on Monday in an attempt to clear up more than a year’s worth of misunderstanding about Apple’s implementation of multitasking in iOS. Spurred on by Apple Geniuses themselves incorrectly claiming that every app in iOS’s multitasking bar is using up memory and CPU cycles, Speirs wrote a detailed explanation of how the operating system actually handles background apps.

Speirs drives home the point that the multitasking bar is only a list of recently used apps, not a list of running apps users should manage. He makes a strong, clear argument for how iOS multitasking actually works, but the article has spurred discussion about the divide between how multitasking is meant to behave and the reality of everyday use.

== TEASER ==

Speirs‘ entire blog post is worth a read-through if you’re interested in how mobile operating systems handle background applications. More importantly, it helps differentiate between informed and uninformed user criticisms. If you don’t want to read through the blog, here are the most important elements:

Let’s get technical: iOS apps have five states of execution. These are:

  • Not running – the app has been terminated or has not been launched.
  • Inactive – the app is in the foreground but not receiving events (for example, the user has locked the device with the app active)
  • Active – the normal state of „in use“ for an app
  • Background – the app is no longer on-screen but is still executing code
  • Suspended – the app is still resident in memory but is not executing code

When you press the home button, the app moves from Active to Background. Most apps usually then go from Background to Suspended in a matter of seconds.
The first technical caveat is that Suspended apps remain in the device’s memory. This is so they can resume more quickly when you go back to them. They’re not using processor time and they’re not sucking battery power.

Speirs doubled down on two core concepts: the multitasking bar always shows recently used apps and is in no way affected by what’s running in the background, and suspended apps do not hog memory.

  1. If someone tells you that all the apps in the multitasking bar are running, using up memory or sucking power, they are wrong.
  2. When you hit the home button, an app moves from Active to Background and quickly to the Suspended state where it no longer uses CPU time or drains power.
  3. An app may request an additional 10 minutes of Background running to complete a big task before becoming Suspended.
  4. If memory is becoming scarce, iOS will automatically move Suspended apps into the Not Running state and reclaim their memory.
  5. Five classes of apps – audio, GPS, VOIP, Newsstand and accessory apps – and some built-in apps such as Mail may run indefinitely in the background until they complete their task.

Moms and dads using iPhones can’t distinguish between an app that uses memory and battery life in standby and an app that behaves as it should.

How does that Speirs‘ explanation jibe with user claims that iPhones slow down with multiple apps in memory? Multitasking doesn’t always work as it’s meant to. This can happen when an app doesn’t terminate properly, takes too long to free up its memory, or gets hung up in its suspended state. Then there are other apps that eat up battery life by calling on GPS, which Speirs does address.

The article spawned a lengthy (and surprisingly informative) discussion on Reddit that’s worth reading if you enjoy debating the nitty gritty details of multitasking programming. GPS and other apps that fit into the fifth category listed above do threaten Speirs‘ claim that „you do not have to manage background tasks on iOS.“ Poorly written apps can put a wrench in that theory.

More simply, moms and dads using iPhones can’t distinguish between an app that uses memory and battery life in standby and an app that behaves as it should. Only power users would know to pick out and kill a battery-draining GPS or VoIP app. Speirs does a good job of correcting misinformation about how multitasking works, but as iPhone devs in the Reddit discussion point out, some apps don’t quite play by the rules.

from Tested Site Mashup http://www.tested.com/news/the-truth-about-apple-ios-multitasking-and-memory-management/3389/

Advertisements

Aktionen

Information

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s




%d Bloggern gefällt das: