Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

IPhone 4, Multitasking Done the right way

  • 10-06-2010 9:42am
    #1
    Registered Users, Registered Users 2 Posts: 5,517 ✭✭✭


    Can anyone tell me what is so special about multitasking on the iphone 4 that makes apple use taglines like "Multitasking Done the right way"?

    Does anyone know how it works on the iphone 4 as compared to the likes of the htc desire?


Comments

  • Registered Users, Registered Users 2 Posts: 3,220 ✭✭✭cojomo2


    axer wrote: »
    Can anyone tell me what is so special about multitasking on the iphone 4 that makes apple use taglines like "Multitasking Done the right way"?

    Does anyone know how it works on the iphone 4 as compared to the likes of the htc desire?


    Not sure exactly, but when they say 'done the right way' I think they are referring to the fact that they claim its a lot easier on battery and cpu than multitasking on other phones.


  • Registered Users, Registered Users 2 Posts: 5,517 ✭✭✭axer


    cojomo2 wrote: »
    Not sure exactly, but when they say 'done the right way' I think they are referring to the fact that they claim its a lot easier on battery and cpu than multitasking on other phones.
    Yes, just trying to figure out how it is better.


  • Registered Users, Registered Users 2 Posts: 5,517 ✭✭✭axer


    Found this:
    http://gizmodo.com/5512656/how-multitasking-works-in-the-new-iphone-os-40

    It seems it works exactly like android.


  • Registered Users, Registered Users 2 Posts: 211 ✭✭djgaillimh


    I keep reading that it's not 'true' multi-tasking... but what exactly this means I'm not sure.

    Could be a little cheat that allows the OS to 'suspend' an app like a browser in the background, where it's not draining memory or battery (or draining very little, anyway), and then when you re-activate it resumes exactly where you left it.

    That's the trick Android uses, more or less.


    I'm curious about it myself though. because with the relatively limited RAM I don't see how they could be using the same trick as Android. Maybe somebody who has used the dev build of iOS could shed some light...

    edit: OSI's post wasn't there when I hit reply...


  • Registered Users, Registered Users 2 Posts: 211 ✭✭djgaillimh


    OSI wrote: »
    Multitasking is usually done by allowing multiple apps to run at the same time. Literally just that, if you have one app open and open another, the first is left running away in the background as it was.

    The new iPhone OS attempts to change this by allowing devs to choose what sort of behaviour the app performs when it is no longer the main app. For instance, there is no point in an app constantly rendering images if it's not the front app.

    Another behaviour it enables is the freezing of a state of an app. A good example of this would be working with a text editor and a browser, if you were changing between the two of these, normally the 2 apps would run continuously, using twice the CPU power, but what is the point in keeping something running in the background when it's state doesn't change. The OS will instead freeze the app in it's current state to ram and then when you return to it, restore the app to it's frozen. The user doesn't notice anything happened, but a good deal of CPU power was saved.


    Have you used it? Is there a cap on how many apps can be suspended in the background? Any memory issues?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 6,790 ✭✭✭cornbb


    In a nutshell: when the user switches apps, the OS will suspend all backgrounded processes, preserving their state so the user can be resumed from where they left off, EXCEPT any case where the developer has opted to use one of the new multitasking services/APIs, in which case the relevant services will continue to run.
    http://developer.apple.com/technologies/iphone/whats-new.html
    Multitasking
    iOS 4 delivers seven new multitasking services that allow your apps to perform tasks in the background while preserving battery life and performance. These multitasking services include:

    Background audio - Allows your app to play audio continuously. So customers can listen to your app while they surf the web, play games, and more.
    Voice over IP - Your VoIP apps can now be even better. Users can now receive VoIP calls and have conversations while using another app. Your users can even receive calls when their phones are locked in their pocket.
    Background location - Navigation apps can now continue to guide users who are listening to their iPods, or using other apps. iOS 4 also provides a new and battery efficient way to monitor location when users move between cell towers. This is a great way for your social networking apps to keep track of users and their friends' locations.
    Push notifications - Receive alerts from your remote servers even when your app isn't running.
    Local notifications - Your app can now alert users of scheduled events and alarms in the background, no servers required.
    Task finishing - If your app is in mid-task when your customer leaves it, the app can now keep running to finish the task.
    Fast app switching - All developers should take advantage of this. This will allow users to leave your app and come right back to where they were when they left - no more having to reload the app.

    The fact that developers need to explicitly opt-in to multitasking functionality has the benefit of saving on resources, ensuring that only processes which are actually needed will be left running. It does mean that apps will need to be updated to take advantage of that, though.

    True, it's not "real" multitasking, but it makes far more sense than "real" multitasking, which is far cruder and more wasteful. It will seem like real multitasker to the user if the new APIs are implemented properly anyway.

    Hope that makes sense.


  • Registered Users, Registered Users 2 Posts: 211 ✭✭djgaillimh


    Ok, so it's a 'service based' multi-tasking, if you want to call it that. Clever.


  • Registered Users, Registered Users 2 Posts: 2,370 ✭✭✭Knasher


    In terms of memory I'd imagine that it takes the same approach as all linux based systems do (I'm not 100% sure if unix based systems take the same approach but I suspect they do). Firstly I'd imagine that a certain amount of the flash memory will be used as swap in order to increase the amount of memory available. Secondly I'd imagine that the OS will have some system in place to kill off apps that haven't been active for some time or are using up too much memory. I'd imagine the whole thing can be implemented in a way which is mostly transparent to the user, such that if you haven't used a running app in a while it will be slower that normal, but otherwise look exactly like it did when you left.

    What I don't get is their comparison to other phones, honestly appart from the restriction on what API calls you can make, this is exactly the same as Android does it (Android also limits running apps to about 10% cpu, I'd imagine that iOS will have something similar). Its definitely the right way to do it because you don't need full multitasking with a screen that is only feasible to look one app at a time. I'd imagine that the "multitasking done right" is a reference to full multitasking rather than to other phone OSs (though Im not all that familiar with other phones I'd imagine they do something similar).


  • Closed Accounts Posts: 8,199 ✭✭✭G-Money


    I hope this works with iMapMyRun, iTreadmill etc. I'd like to have both of those or one of them running alongside another app but so far I can only have one running at a time. iMapMyRun uses GPS to track my route and I'd like to have it running at the same time as having iTreadmill or C25K.


  • Closed Accounts Posts: 1,404 ✭✭✭Pittens


    iMapMyRun uses GPS to track my route and I'd like to have it running at the same time as having iTreadmill or C25K.

    Seems like that should work because of the background location API.

    The Task finishing api could also work, as it allows all apps to run in the background and do what they want until the task is fininished ( a subjective judgement), I bet however that Apple will come down like a ton of bricks on apps that do that where they dont need to - i.e. poll for twitter etc., but will allow apps with useful functionality to run in the background.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 26,584 ✭✭✭✭Creamy Goodness


    I hope this works with iMapMyRun, iTreadmill etc. I'd like to have both of those or one of them running alongside another app but so far I can only have one running at a time. iMapMyRun uses GPS to track my route and I'd like to have it running at the same time as having iTreadmill or C25K.

    apps will have to be updated to use this background processing API's, no app will work with multi-tasking unless it's specifically written to.


Advertisement