Live data from Hacker News

Mobile Multitasking

daringfireball.net

1–10 of 68 posts

Re: Mobile Multitasking

#2
I'm glad that iPhone OS is providing us an excuse to take personal computing a least a few steps down the path to where it should have gone years ago.

Users shouldn't have to launch and quit applications. They shouldn't have to save and open documents. State should just persist. Always.

If you pull the plug on your box you should be able to plug it back in and all state should be restored within seconds.

All applications should always be "running" and in the same state you last left them. You only need to switch focus between them as you perform your tasks.

Can modern OSes really not be made smart enough to manage our systems in this way? Why do users decide which applications get memory and CPU resources? Why do I need to manually start a bunch of applications and open documents after restarting my computer? None of this makes sense.

Hopefully iPhone OS can push us further down this path.

Re: Mobile Multitasking

#4
I'm curious why iPhone can't page application memory out to persistent storage (whatever of that 16GB etc you're not using for music) when they're in the background and RAM runs low. That would be the ideal - frozen background apps saved to persistent storage until needed without sitting in RAM.

I'm assuming the OS is modern enough that all apps have their own address space so perhaps the hardware doesn't have an MMU capable of the necessary remapping of physical memory into a different address space.

Oh and two nits with Grubers piece. 1) This system is well thought out but it's hardly "state of the art" and 2) on iPhone OS 4.0 backgrounded apps will receive a willTerminate notification before they're completely terminated.

Re: Mobile Multitasking

#5
The close button on Windows Mobile never closed the apps either, it just minimized them. If you ran out of memory, Windows Mobile would close the oldest used application automatically.

A great blog post, the Emperor has No Close about this:

http://blogs.msdn.com/windowsmobile/archive/2006/10/05/The-E...

Re: Mobile Multitasking

#6
post #4

I'm curious why iPhone can't page application memory out to persistent storage (whatever of that 16GB etc you're not using for music) when they're in the background and RAM runs low. That would be the ideal - frozen background apps saved to persistent storage until needed without sitting in RAM. I'm assuming the OS is modern enough that all apps have their own address space so perhaps the hardware doesn't have an MMU…

When an app is swapped to disk, all it's code and data pages are stored. When it's resumed, the code and data pages are loaded back. This isn't so terribly different from relaunching the application (loading the code) and having the app restore it's state (loading the data). In fact, the app can even be more efficient in saving it's own state because it can discard anything it knows it doesn't need.

Paging is really only necessary if you can interact with more than one application at time. On an iPhone, that doesn't happen. Paging is probably less efficient than this system.

Re: Mobile Multitasking

#7
post #5

The close button on Windows Mobile never closed the apps either, it just minimized them. If you ran out of memory, Windows Mobile would close the oldest used application automatically. A great blog post, the Emperor has No Close about this: http://blogs.msdn.com/windowsmobile/archive/2006/10/05/The-E...

The default is to minimize apps when you tap the close button, but kill them if you hold it down. You can change this in the preferences.

Re: Mobile Multitasking

#9
post #2

I'm glad that iPhone OS is providing us an excuse to take personal computing a least a few steps down the path to where it should have gone years ago. Users shouldn't have to launch and quit applications. They shouldn't have to save and open documents. State should just persist. Always. If you pull the plug on your box you should be able to plug it back in and all state should be restored within seconds. All applicat…

I agree. I was showing my iPad to a friend the other day and she asked me how to save a Pages document. It took me a few seconds to figure out how to explain that there was no need to save documents. Documents are just always there.

Re: Mobile Multitasking

#10
post #2

I'm glad that iPhone OS is providing us an excuse to take personal computing a least a few steps down the path to where it should have gone years ago. Users shouldn't have to launch and quit applications. They shouldn't have to save and open documents. State should just persist. Always. If you pull the plug on your box you should be able to plug it back in and all state should be restored within seconds. All applicat…

You mean, following down the path that Palm OS devices used since first released in 1996?
Post reply on HN