13

I usually work with a lot of instances of visual studio open to different projects, I was wondering if there is a way to snapshot/hibernate a running process to disk instead of closing it so that I can open it in the same state as it was quickly.

I have a ton of free disk space so wouldn't mind saving the entire process snapshot if it would save me the time in opening up the solution and waiting for the projects to load.

6
  • +1: Interesting idea! (Of course this is exactly what the virtual memory manager is trying to do for you automatically as and when required.)
    – Andy
    Commented Jun 11, 2010 at 15:24
  • 2
    FWIW, something like this ("unexec", based on a core dump) is traditionally part of the build process for Emacs on UNIX systems. See, for example, xemacs.org/Architecting-XEmacs/unexec.html
    – coneslayer
    Commented Jun 11, 2010 at 15:31
  • 1
    That was specifically designed for emacs no? I wonder if a general purpose version could be written.
    – Andy
    Commented Jun 11, 2010 at 15:47
  • I have been searching for something like this for quite some time now. It would especially help if you wanted to pause a video encoder! Commented Jun 11, 2010 at 17:31
  • 1
    It seems like there is something like this for Linux linux.org/apps/AppId_2488.html However I think the problem is going to be open file handles, network sockets etc., which make this a non-trivial problem
    – Sijin
    Commented Jun 11, 2010 at 17:52

3 Answers 3

2

I do this using VirtualBox from Sun for separating projects. It's also handy because you can take snapshots.

The drawback is you need to put an entire OS on there.

1
  • 3
    Yeah - I use VirtualBox for OS level snapshots, that's where i got the idea for an application level snapshot. It seems like there is something like this for Linux linux.org/apps/AppId_2488.html However I think the problem is going to be open file handles and such, which make this a non-trivial problem.
    – Sijin
    Commented Jun 11, 2010 at 17:51
0

ProcessExplorer from MS Sysinternals let you Suspend a process. does this help / do the job ?

4
  • 5
    Unfortunately not... I wanted to take the process out of memory in order to free it up, not simply pause the application. Although this IS a very useful program for CPU intensive applications that you may need to pause! Commented Aug 8, 2010 at 15:39
  • Suspending a process effectively freezes all other processes that happen to send some windows messages to it. It so happens that some processes do like to send messages to other processes, and some processes like to be targets for such broadcasts. So, suspending some processes is harmless, but for other cases it will interfere Your work with the computer. And one more thing. Some processes, after being resumed from long-lasting suspend, will freeze and take all your CPU to make up for all the lost time computing something very smart :P Commented May 17, 2013 at 15:51
  • There is also a pssuspend command line utility from MS Sysinternals. You can find it over there: technet.microsoft.com/en-us/sysinternals/bb897540. It is part of a PsTools package: technet.microsoft.com/en-us/sysinternals/bb896649 where You can also find for example a pskill tool, which is for example rather handy after resuming a process and it happens to get way too excited. Commented May 17, 2013 at 15:54
  • 1
    @Breakthrough but if the process is suspended, it will give up memory (as other programs utilize memory they’ll cause this one to be paged out) without ever trying to reclaim it until you resume it. This is really the closest/safest way to get what you want—a swapped out suspended program basically is a safely stored snapshot of it, just one that is lost on reboot.
    – binki
    Commented Jun 30, 2016 at 20:30
-1

You can use WinDbg (Microsoft tool) to create a dump of the current state of a windows machine. Usually this is used to analyse problems, but maybe it could serve your needs as well. Search for keywords WinDbg and dump for further information, maybe there is even an option to dump only single processes.

1
  • 1
    The dump file can’t be used to restore the process. Commented Jun 11, 2016 at 12:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .