Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Shock, horror: Multitasking has been working for a decade and a half!

29 replies · 4,555 views · Started 30 March 2009

Why the big deal over problems with multitasking in a phone? Why the cries of "Can't be done" from the Apple world? I've been multitasking on just about every device I've owned since 1993.... What's really behind the current negative thinking over background applications on the iPhone? I put forward my experiences with Psion, EPOC and Symbian-OS powered devices over fifteen years as evidence that a well-written operating system shouldn't need kludges like Apple's 'Push notification' scheme.

Read on in the full article.

Are you sure Steve? Symbian apps are developed to take part in the multi-tasking by deriving classes from CActive. This is the Symbian Active Object (so named before MS stole the words).
Symbian Active Objects are a co-operative multi-tasking, and this method uses absolute minimum processor when the app is not in the foreground, and thus conserves battery.

This is the often overlooked advantage that Symbian has, because it is a mobile OS designed from the ground up to work with minimal hardware and power resources. Nobody ever gives it credit, but NO other OS is anywhere near it in that respect, it is way out in front. This is why fat and clunky linux and unix based ports are struggling with multi-tasking and why Windows Mobile eats battery.

Steve, the OS from which Symbian OS is descended is EPOC32, which was new new development with a complete new codebase released in 1997, on the 5 and Revo.

Forgive me for pointing out but basically the entire point of an Operating system is to manage the resources of a device, including processor time.

In a sensible OS it controls whether a process can run or not based on a number of factors.

So either i) MacOS/Linux as an OS is so fundamentally broken it is unable to perform such a basic task or ii) whatever nonsense Apple come up with is utter rubbish. Given the heritage of Linux I leave you to draw your own conclusions.....

In EPOC 16 (running on a 7.68 Mhz processor) - yes thats about the same processing power as a 10th century washing machine, there were never any significant real world issues with multi-tasking because the OS stopped total stupidity. It is/was not possible to say block the Kernel, file server or window server etc from running because the OS stopped such abberant behaviour, Symbian OS is not that much different.

If this is truely a problem then clearly the OS is not fit for the purpose alot of people actually want to use the devices for and perhaps Apple should think about using an OS thats is fit for purpose and putting their UI on top of it.

Almost certainly the real problem is that most iPhone components cannot properly handle somewhat abnormal conditions, e.g. low/out of memory without crashing/exiting. Not unreasonably Objective-C as a language attempts to hide all the nasties associated with memory management (as does say java) with the consequence that practically no programmer has any notion of how to handle an out of memory error condition in an app - other than exit. In most cases this is inappropriate behaviour as far as the user is concerned. By stopping any background apps you more or less elimiate this problem as the amount of Ram avail to any single app is pretty much the same from start to finish of the app.

So my conclusion is that a 10th century washing machine is clearly more fit for purpose than MacOS !!

i think the "games" argument is a little bit wonky, but i agree with the rest of the article.
also, apple could solve the "problem" in a very simple way - namely by categorizing the apps during their review into apps allowed to run in the background, like IMs, GPS stuff, etc etc, and apps not suited to run in the background, like games (?) or other very resource heavy stuff. the app then would carry a (apple-signed) multitasking-flag, which tells the OS if it is allowed to run in the background or not. it's as simple as that - and apple can keep full control of the whole process.

EPOC 32 was derived from EPOC 16

In short, Active objects are co-operative within a single thread to reduce the number of threads needed in the overall system to do a task + be very signficantly more efficient in handling multiple event sources within a thread.

The OS manages multiple threads and has little to do with active objects - thread get multitasked regardless of whether they happen to use AO's or not.

Great article Steve! Although i love the iphone, for all it does right, this is something i don�t "get".

For 90% of apps, there�s not a big deal on not having multitasking. For IM apps, i reckon Push Notification should be enough. But there all other types of apps, that NEED to run on background to be usefull, like gps trackers, etc. And sometimes, you just want to have one or two apps always on to jump quickly between them. On the iphone, using backgrounder, i normally have tweetie and beejive always running.

This article also shows what i�ve been saying in several iphone forums. 128mb of RAM is not a low value!!! Like the 5800, and my old P1, show, it should be enough for alot of multitasking on well optimized OSs. But on the iphone scene what we hear is that the iphone is very limited regarding RAM

Apple sees everything from a design/monetisation point of view.
Think of the wider picture. Multitasking means a less deterministic environment - no developer can test their app in concert with a million permutations of other applications contesting for resources (RAM/CPU/sockets/LBS/Bluetooth/energy).

The question of weather the OS can support it is irrelevant.
As an example. Lets say that iPhone OS guarantees a high watermark of 200MB ( that is, the OS stack/menu etc will consume at most 200MB) so that when your app runs it will always have the same amount of RAM available to it. You can design your app so that you don't have to trouble the user with low memory dialogs. Or again if you are contesting for a shared resource, you don't have to have logic in your code which deals with a Bluetooth headset already being in use.

The net result of a restriction is less entropy - a problem that has plagued mobile software as it has struggled to maintain QA in the face of growing complexity.

Apple are masters of reducing entropy, which should translate to reduced support cost, improved perception of quality by both retailers and consumers and damage limitation to their brand = further monetisation.
We don't want a PC on our phone - we want a consumer electronics heritage of "just works".

If you want to see how shameful an out of memory handling system can be. Look at Trolltech's experience of dealing with out of memory:
doc.trolltech.com/qtopia4.3/syscust-oom.html

or this shocker from sutter:

gotw.ca/publications/mill16.htm

"On some operating systems, including specifically Linux,[4] memory allocation always succeeds. Full stop. How can allocation always succeed, even when the requested memory really isn't available? The reason is that the allocation itself merely records a request for the memory; under the covers, the (physical or virtual) memory is not actually committed to the requesting process, with real backing store, until the memory is actually used. Even when the memory is used, often real (physical or virtual) memory is only actually committed as each page of the allocated buffer is touched, and so it can be that only the parts of the block that have actually been touched get committed.

Note that, if new uses the operating system's facilities directly, then new will always succeed but any later innocent code like buf[100] = 'c'; can throw or fail or halt. From a Standard C++ point of view, both effects are nonconforming, because the C++ standard requires that if new can't commit enough memory it must fail (this doesn't), and that code like buf[100] = 'c' shouldn't throw an exception or otherwise fail (this might)."

In summary, an application could fail or be killed on linux through no fault of the application developer.
Whatever people say against symbian - It does have a robust out of memory handling scheme

EPOC32 was definitely an all new codebase in 1997.

Active Objects are the bit that makes the difference to the user, sure the OS does more but CActive is the trick.

Of course iPhone multitasks, you can receive a call in the middle of a web session and then drop back to the web session. It just doesn't go far enough.

Symbian doesn't get the credit but it is the clear winner in this area, especially against fundamentally older OSes like iPhone and Android.

I was listening to MobileTechReview's most recent podcast yesterday, and they were discussing this Apple background app/multitasking 'situation'. And i had to laugh.

At the time i was hiking around Hatfield Forest. Apart from the podcast, i had Viewranger running so i know where i am and where i've been. I also had Google Satelitte maps running to back up what i should be seeing around me. My backup GPS (Internet Tablet N810) was using BT DUN through my phone to update its own (Maemo Mapper) maps (BTW, tethering? On an Iphone? Not OEM available yet!). My push mail (SMTP AND POP3 in two different apps) was announcing messages from family about my trip to L.A later this week. I snapped off a few GeoTagged pics with the phone camera and uploaded them to Flickr. And when i took a break at the park cafe, i was surfing on Opera Mini.

On the way home i turned off Viewranger and turned on McGuider, but still had all the other apps running and the N810 (on VE Streetview) pulling maps through the DUN.

Still had plenty of juice when i got home. Thank you Apple, for reminding me why i went with a better brand.

On a side note MoTR also seemed to be saying that "The Ipod Touch will be the first non-phone device to have Skype". Er, what?

By and large, I've never had problems with multitasking on Symbian phones.

Obviously power users who habitually run literally dozens of apps at once have a good chance of finding a combination that doesn't work, but ordinary users are only going to multitask perhaps two or three apps at a time, four or five at most.

And the apps that ordinary users do use simultaneously are likely to be the standard built-in ones like music player, messaging, log, podcasting etc. These wouldn't be that hard to test in conjunction with a third party app.

We don't want a PC on our phone - we want a consumer electronics heritage of "just works".

If that's genuinely Apple's attitude, then perhaps people should be comparing the iPhone to Nokia's Series 40 devices instead of S60?

That's not a criticism or a joke, it's a genuine suggestion. I've long written about Series 40 (and other feature phones) as less flexible but more stable alternatives to smartphones. If Apple has the same vision for the iPhone's future, then I think it should be called a feature phone, and there's no shame in that at all.

Nokia's known by readers of this site for making smartphones, but the majority of their sales and profits come from non-smart feature phones.

Obviously feature phones are looked down on by most smartphone enthusiasts, but they make up something like 85% of phone sales worldwide. Even in rich countries where most people could afford a smartphone, the majority of phone users still plump for feature phones because they're cheap and good enough.

Also, feature phones aren't necessarily low spec, some of them have autofocus carl zeiss cameras, wi-fi, TV Out and GPS. Nokia's just released a WebKit-based browser for Series 40, which is the same browser engine used by S60 and Safari.

I disagree when you said "GAMES" being the reason for no multitasking. A mobile OS can be designed to do preemptive multitasking where It can take control of that game to a sleep state.

I believe the real reason is that Apple thinks the majority of users don't switch task between apps at all! And if they do, they just multitask MUSIC in the background that's why music multitasking is enabled in iPHone. Due to that, they decided to utilize all resources to that single running app rather than to those background apps that most ignorant users don't even care! I can prove it as I know a lot of friends who own Nseries even since the days of Nokia 6600 and they are not even aware that they can press-and-hold a button in order to multitask! I even instructed them how important it is and adviced them to get used to it. I even demonstrated examples of copy and paste between apps but until now THEY DON'T USE IT!! Majority of smartphone users are really that dumb!!

Good point jhoravi! So, you know what comes next...Apple will "invent" multitasking, and everyone and their cat will start using it regularly

I think most users - and I know, this is not a site for average users - do not want multi-tasking (“multi-what?&#8221😉. This isn’t slewing off into an iPhone fanboi rant, so hear me out.

They don’t want multitasking, they just want to be able to do things quickly and with ease. Occasionally this will involve doing a few things at once. Even less often, this will involve an app doing things without user intervention (a background process). The question is how best to make that possible.

Essentially, you just want the assurance that you can set an app a task and then dismiss it, without having to keep it in the foreground and therefore dominating your attention. I believe Apple’s Push Notifications along with quick app switching will fulfil the need of most users in this regard.

But it won’t work for everyone, and I think the number of people happy to live without background processes will decrease as the expectations of mobile devices increases.

In this context, iPhone OS does have some background processes. I can write a text and dismiss the app while it’s still sending, and know that the text will be sent – but only because it’s an app that Apple has blessed with the ability to do so. What is frustrating is the inability of other built-in apps to maintain a persistent state – I can return to Safari after a while and the pages will be remembered, but will have to load again.

From my own experience of running FStream (internet radio) in the background while doing other stuff, I can say that the battery life of the iPhone 3G isn’t all that drained. Even if just a few user-definable background processes were allowed (without resorting to jailbreaking), it would be a good step forward. But I don’t think Apple will allow that until they can either shoehorn in a bigger battery, or have the OS manage power consumption better - because a phone that doesn't have much battery life has a degraded user experience. Perhaps this is a reflection of Apple's immaturity in designing cellular products.

In the meantime, it just highlights how adept and mature the Symbian OS that background processes are handled very well and that battery life is not unduly impacted. The problem for Symbian is that it operates behind overly complex and generally unlovely UIs (sorry S60&#8230😉.

Matt
allaboutiphone.net

How about this for a conspicary theory. If iPhone OS would allow multitasking, nobody would write about it, because it is normal for an OS to multi-task.

But with a non-multitasking iPhone OS there are lots of technical people writing about it, generating lots of buzz. Given the old adage that "there is no such thing as bad publicity", it means Apple gets an enormous amount of free publicity, which is good for their iPhone sales.

I think everyone is forgetting the amount of apps iPhone and iPod Touch users install 😉

Yes it is silly that Apple doesn't engage Multi-tasking, but if you look at the average S60 user nearly all of them don't add many apps to the phone, meaning that their multi-tasking experience is good because with limited apps in use, they don't get any out of memory messages.

Now with the Mobile OSX platform, even the average users literally have over 50 apps installed on their device. This makes out of memory messages a lot more feasible on an Apple device.

Apple is smart on this one, imagine some silly average user wondering why he can't open all 140 applications one after the other?

Bottom line - most consumers dont know/care about it BUT it can make a massive difference to both developers, application functionality and device usage.

Just a couple of small examples: Push email. Effectively banned on iFart unless you happen to be running the email app. For no sensible reason at all.

How about alarms in say Calendar type apps. Users dont care about whether Muttly will be tasking (or where Dick has got to) however they get (well I get) really p***d off when alarms dont go off because the OS happens to have exited an app containing the alarm - simply because they wanted to say make a phone call.

Without multi-tasking both of the above need some hacks or special OS services. With it all the hacks go away.

All that happens when such a idiotic decision is taken is developers create hacks to get around the system limitations. This started back in DOS days - ala magic background TSR (terminate and stay resident) apps and continues today - with jailbroken iPhones.

The problem with apple fanboys is that every shortcoming will be praised as a "feature". For example, I've seen a lot of cases of people praising the iphone's "camera slowness" saying that they couldn't get such a "nice" blur effect with photoshop if they wanted to. Rubbish.
Ok, the iphone does have its positive points, but no multitasking is one of the worst flaws. Samsung's most modern dumbphones now have multitasking. Sony Ericsson dumbphones have had multitasking for ages. Moto had some limited multitasking on dumbphones. LG is starting to implement it too. I remember reading that even s40 is gonna get it in the future.
Also, every smartphone OS (except Palm OS, but that's an old dog, and upto version 4 it DID support it, and Iphone OS) has multitasking.
No excuses for this, apple. If normal people can multitask on a desktop, they can multitask on a phone as well.

Whatever you think of multitasking, I really wouldn't want to see a repeat of what some extreme Apple fans do which is to condemn some concept until Apple do it, then say it's wonderful.

Before I go any further, I should say the vast majority of Apple fans are perfectly sensible level-headed folk, most of whom are happy to use other manufacturers' devices too. But there's a hardcore, as there is in all fan bases, which seems to try and be 100% Apple 100% of the time, changing its opinions to support whatever Apple is currently doing.

A few years ago there were many forum and blog posts on various sites where the *concept* of a music phone was shot down by hardcore iPod fans, as if no phone could ever compete with dedicated music players. But when Apple announced it was making a music phone, this was suddenly a really good idea among hardcore fans, even though no one had even seen it yet. The same thing happened with 3G, user-installed applications, and practically anything else where Apple followed in other companies' footsteps: shoot down whatever Apple isn't doing, but as soon as Apple plans to do it then praise it to high heaven and perhaps claim Apple invented it.

As I've said in previous threads, this selective reading of history goes right back to the 1980s. The now-familiar much-imitated GUI on Macintosh was heavily based on Xerox's GUI work at PARC, which Apple will freely admit, yet the Xerox part of GUI history is frequently airbrushed out by hardcore fans. To give a more recent example, the ITunes software was originally a third party application which was bought, repackaged and then heavily marketed by Apple, yet how many people realise this? Even the iPod was apparently brought to Apple by an engineer from Psion, rather than originated within the company.

Apple's success is largely in taking existing products and making them easier to sell to consumers, in making them attractive and hyped enough that some people will be willing to pay very high prices. High prices restrict market share, but they also mean even relatively low sales can generate good profits. By and large Apple are more marketers than engineers: they don't invent stuff or do stuff first, they take existing stuff and make it more sexy so that they can demand a higher price for it. And Nokia are more engineers than marketers: they invent stuff but largely rely on third parties to do interesting things with it.

In some ways the dream team might be a combination of Nokia's hardware prowess and Apple's marketing nouse, but I doubt we'll ever see that happen as their methods of operating are so different.

Nokia possibly formed the Nseries brand in order to imitate Apple's strategy, to put slicker packaging and interface features on existing S60 technology for use in expensive higher end models with an exclusive reputation. Numbered S60 devices frequently have similar tech specs to Nseries devices, yet their Nseries equivalents sell for much higher prices simply because they have more glamorous casings and easier-to-use media applications.

None of this is a criticism of Apple, it's just an observation that a small percentage of extreme Apple fans are overlooking the essence of what makes their favourite company successful.

Great Article... I wish this article can also be posted to other forums/blogs where people are arguing for iPhones.

Apple is just good at creating 'hype'. Even the features announced in OS 3.0 are in S60. I still wonder why Apple calls it the most advanced mobile os, where as they are still developing the basic smart phone features.

@Jhoravi: Yes, people don't use S60 OS properly but it doesn't mean that mobile os shouldn't have the features. There's a large number of people that only buys S60 for feature rich smart phone. It'll take Apple a decade to create an entry level smart phone.

I agree with almost all your comments Steve re the iPhone and multi-tasking but I do have to make a comment about your statement that OSX can't multi-task as well as XP/Windows.
We are a company which writes software for industrial control systems and this entire area is dominated by tools which have to run under a MicroSoft OS. I started to use an iMac at home a couple of years ago as I wanted to try something different, I loved it, and when it came to buying my last Laptop for using at work I broke the mould and bought a Macbook Pro.

Now to my real point...

On this machine (with 4GB Ram) I regularly run (concurrently) 2 different XP Virtual Machines, Entourage, Excel, Word, Firefox (with about 10 tabs open), Skype, Terminal and various 'Finder' windows, not to mention various Expose widgets etc. Not only does the whole thing multi-task beautifully, but I can run different apps in different desktop 'Spaces' and jump between these at will.

If I'm leaving the office, I suspend the VM's and shut the lid, go to a site, open the lid and start working again almost immediately.

One last thing, this is now 30th March 2009, the last time I re-booted my laptop was October 2008, try doing that on a MS based laptop!

Love the site, keep up the great work.

"One last thing, this is now 30th March 2009, the last time I re-booted my laptop was October 2008, try doing that on a MS based laptop!"
OSX has had at least 2 security updates that required rebotting during the past few months, plus the there was the really big 10.5.6 update in december.

You should really reboot as soon as possible.

>> If that's genuinely Apple's attitude, then perhaps people should be comparing the iPhone to Nokia's Series 40 devices instead of S60?

In some ways absolutely. Apple are a product company who I think accidentally got into 3rd party development. I think they always intended to have commercial companies be able to deploy applications through their private developer programmes, but it was a last minute decision to allow bedroom programmers access.

Apple clearly didn't need multitasking to make the iPhone a success and as someone has pointed out - when they do release it, it will be wowed by fanbois.

Apple got a phone to market in a very short time of decent quality by concentrating on the product and limiting the scope. If multitasking was in release 1, they couldn't rollback the solution if it turned out to be unstable or the support costs for 3rd party development were huge.
By listening to demand they, can add new features and make them appear as "gifts".

Look at how nokia integrate a new feature - slap another app on the menu bar and tick a box - it's not product design.

If multitasking was in release 1, they couldn't rollback the solution if it turned out to be unstable or the support costs for 3rd party development were huge.

Just to be clear on this point:
1) they did in fact rollback the push API, which was originally introduced last year and slated to be in version 2.1 of the iPhone OS, claiming that their servers couldn't handle the strain
2) they have absolute, dictatorial control on which 3rd party applications get released. If a 3rd party app misuses their APIs in any way, they can pull it out of the store without warning, assuming it makes it to the store in the first time
So the argument "they must think carefully about how to implement multitasking, because if they let out an API that can be misused/abused, they cannot take it back" is absolute nonsense. They can publish an API that has flaws, censor all apps that take advantage of that flaws, and ultimately fix those flaws in some subsequent release.

Unregistered wrote:Just to be clear on this point:
1) they did in fact rollback the push API, which was originally introduced last year and slated to be in version 2.1 of the iPhone OS, claiming that their servers couldn't handle the strain
2) they have absolute, dictatorial control on which 3rd party applications get released. If a 3rd party app misuses their APIs in any way, they can pull it out of the store without warning, assuming it makes it to the store in the first time
So the argument "they must think carefully about how to implement multitasking, because if they let out an API that can be misused/abused, they cannot take it back" is absolute nonsense. They can publish an API that has flaws, censor all apps that take advantage of that flaws, and ultimately fix those flaws in some subsequent release.

Rubbish.
Yes it helps that they are dictatorial and have control of the supply chain, but they cannot ban applications on the ground that they are using an Apple API in the way it was meant to be used.
Even apple would see a retraction of such an API as am embarrassing last option.

My point about multitasking is that you need to think from the UI point of view how you deal with failure to obtain a resource. The existing solutions on all platforms are pretty awful.
Apple have to think how their own code deals with failure if a 3rd party app interferes with them - which makes the software more complex, the testing more labourious, delays shipping and causes problems with perception in quality.

Perhaps we should stop using the phrase multitasking to mean "concurrent applications", since support for multitasking is easy at the kernel level but concurrent applications on an open-to-3rd party system requires a lot of design and engineering to pull off robustly.

Steve Litchfield:

found in over a quarter of a billion smartphones in use around the world today

That's a cumulative number of Symbian smartphones shipped, not the number in use today. I have owned many Symbian smartphones, but only one of them is in use today.

Can the editors post a correction?

Guys, you're not looking at this problem from Apple's frame of reference.

Apple have a chance to build a near perfect platform from the ground up. Mobile OSX could be - as long as Apple continue to show good judgement and restraint - *the* computing platform of the next decade.

Rest assured, Apple will 'fix' all these problems in due course, in the meantime they continue to innovate and refine the platform is ways that no other computing company can match.

Could Apple bring multi-tasking to the iPhone today? Of course, no question about it. Should they? I honestly don't know that answer to that one, but I do know that people all over the world have generally great things to say about iPhone, the App Store and OSX, so I'm inclined to think that the Apple's management team have a pretty good grasp on reality and half-decent business acumen... unlike some other companies that I shall not name here for fear of being pummelled.

Come on Steve. Maybe you don't know Apple as well as some of us do, but here's a tip... Apple never does anything for the heck of it. Do you think the infrastructure to do notifications is cheap? All the hardware and carrier deals that need to be arranged for that "feature" cost a fortune.. The real reason Apple is not doing background processing as they already do on OS X for Macs is because <<drum roll please>> they're working on a new generation iPhone based on a CLOUD version of the iPhone OS. Take a look at the patents and put the dots together. It will all make sense in about a year!

Unregistered wrote:Steve Litchfield:

That's a cumulative number of Symbian smartphones shipped, not the number in use today. I have owned many Symbian smartphones, but only one of them is in use today.

Can the editors post a correction?

Can the editors please ignore this pedantic drivel.

Unregistered wrote:Can the editors please ignore this pedantic drivel.

Especially as he's wrong. Gartner's figures show about 230 million sold in the last two years so it actually is a current figure.

Hey,Steve your article got a brief mention on the latest Engadget podcast. 😊 Go check it out if you want.