Process “hibernation” utility



Guy Leech


I am currently an architect at AppSense, having been responsible for the initial idea and implementation of their very first product, namely Application Manager, and have been working with Citrix products at a technical level since 1995.

My background is in development, first on Unix then Windows, as well as consultancy and even some pre-sales and customer support thrown in.

Any spare time I get these days seems to be spent "playing" with technology.

I was proud to receive the VMware vExpert award in 2009.
Posted Thursday, September 24, 2009 by Guy Leech | 3 Comments | 5768 views

Tags:  Tools and Scripts |  All Articles

Ever have the need to pause a process so that you can come back to it later – maybe something that is resource hungry, difficult to get back to the same point in if you quit it or possibly doesn’t work when away from the corporate network? Then this is the utility for you – via a simple user interface it allows you to pause and resume any of your running applications/processes.

This utility presents a simple user interface which just lists the processes running interactively for the user you are running it as. This is to avoid the temptation to pause services and other system processes which could prove catastrophic. This also means that it is Terminal Server friendly/aware. Simply select the process or processes, via the usual multiple selection methods, and click the relevant button to pause or resume. There is deliberately no automatic refresh of the process list so click the refresh button before making your process selections. I have performed quick tests on XP, Vista, Win7 and WS08 R2 with RDS/TS.

It also empties the working set of the processes it pauses which reduces their memory footprint to virtually zero thus making the memory available for other applications. This memory is stored in the pagefile so that it is available to the processes when they need it after resumption. This is achieved using standard Windows API calls.
 
Any windows associated with the processes will be minimised and then hidden such that they are not visible on the desktop(s). If you are using the (great) SysInternals/Microsoft Desktops tool to provide multiple, switchable, desktops then this tool is compatible with that too.
 
Note that Internet Explorer version 8 is an example of an “interesting” application in that it has multiple windows and multiple processes so you are strongly advised to pause all iexplore.exe processes in one go and again resume all of them together when required. A further issue you can get with IE8 is that if you quit the tool with iexplore.exe processes still paused, resuming them in a new instance of the tool will not know which windows were previously visible such that it will make all windows visible which will not look very pretty.
 
If you are going to pause any processes that contain unsaved work, e.g. a document in Microsoft Word, then I strongly suggest that you save the changes first, just in case problems are encountered resuming it or the machine is shutdown or crashes. Autosave features will not work in the applications you pause for obvious reasons.
 
Please consider this as a technology preview as I know it is not perfect yet (for instance, it does not yet resize properly) and I will be adding more features – some I already have in mind and others hopefully from feedback received.
 
You will need to have the very latest Visual C++ 2005 x86 SP1 runtime installed (released 28/07/09) which is available here - http://www.microsoft.com/downloads/details.aspx?FamilyID=766a6af7-ec73-40ff-b072-9112bab119c2
 
Disclaimer
 
This utility is provided as-is without any warranty implied or otherwise and is used at your own risk. The author and the owners of the web site hosting it cannot be held responsible for loss or damage caused by the use of the utility.

Download


Comments


Guest on Friday, September 25, 2009 says

This is way cool!!!!!!!

I used this program on a Citrix Server today to fix a problem. Way cool!!!

from Tom Posau.
Guest on Wednesday, September 30, 2009 says

Very nice :-)


Baz Bremmer
Guest on Friday, October 02, 2009 says

One could argue that certain types of processes (for example those without significant dependencies i.e. mindsweeper) would be elegible to dump to a separate file and restored at some future time or on a completely different computer.

Would this be feasible using your approach?