I think I read Vista will have something like that that will allow you to save application state when doing a reboot for something like updates. I'm not sure if this will work with every app and if you can do it on-demand, though.

I think I read Vista will have something like that that will allow you to save application state when doing a reboot for something like updates. I'm not sure if this will work with every app and if you can do it on-demand, though.

If those applications use the new APIs, I believe.

Ideally, those APIs could also be used to save state on application close, and not just reboot.

So you're in the middle of coding/photoshopping/writing, and you have to leave. Instead of shutting the application down, just "hiberate it."

I think I read Vista will have something like that that will allow you to save application state when doing a reboot for something like updates. I'm not sure if this will work with every app and if you can do it on-demand, though.

I understand some programs don't work well with the existing Hibernate feature.

For example, programs that use the windows clock, wouldn't they be thrown off by the clock saying something like 17:40, then the computer hibernating, then the program seeing the clock now read 09:50.

Sven Groot wrote:I think I read Vista will have something like that that will allow you to save application state when doing a reboot for something like updates. I'm not sure if this will work with every app and if you can do it on-demand,
though.

I understand some programs don't work well with the existing Hibernate feature.

For example, programs that use the windows clock, wouldn't they be thrown off by the clock saying something like 17:40, then the computer hibernating, then the program seeing the clock now read 09:50.

Oh. I haven't even considered that. I am working on something now that is triggered by timed events.

Hibernation works when all the computer's memory is dumped to the hard disk; as are the CPU registers and other important status information.

But what if I don't want to turn off my computer but 'hibernate' an application? For example, what if I'm reading a PDF and can't save my page and just want to pause the program until a later date?

Why can't we have a new option on the right click of all running processes that allow a person to store their status until the application is next launched?

You can expand that by having profiles for home and work on your laptop; instead of quiting applications just store all process info and shut them down, and then re-load it when requested to do so...

Now Windows, Linux and Mac OS X teams let's see who can "innovate" that first.

Supercomputer operating systems tend to have a feature like this (often with special hardware support) they call "checkpointing" because processes can run for weeks so it's a big deal if they have to start it again from scratch. If the machine crashes or has
to be powered down for some reason they can go back to the last checkpoint rather than start from scratch.

It's entirely feasilble to write such a facility for Linux, in fact it may already exist. For example the MOSIX clustering system has the ability move a process from one machine on the cluster to another and thus must have the code at some level to serialize
a processes state to disk for some period of time.

Of course the basic unix APIs are much simpler than those of a graphical platform. Serializing the state of all the open windows and the potential interactions with all the other apps on the system would be much harder.

Besides you have to ask if hibernating a process in the way an OS is hibernated is actually the best way to achieve your goal. You can have a typical app that uses 30Mb of memory and thus takes a long time to swap out and swap back in again even on a fast machine
(as we know when we minimize an app!) and that actually takes longer than the app did to initially load.

With that in mind it would be better to provide a WM_SLEEPAPP message or something that would tell the app to save it's current state in the most compact way possible, then have a way of telling the app when it's started that it should use that state file.
It would best faster in almost any scenario as even when there's a lot of unique data within the process, the app can still decide what is the most efficient way to save it which is better than just dumping memory to disk. Perhaps the facility that Sven is
refering to in Vista works like this? It'll take a while for app developers to catch up, but that's life.