Saving and restoring the running state of a program?

Page 1 of 2 12 LastLast

  1. Posts : 24
    Windows 10 Enterprise
       #1

    Saving and restoring the running state of a program?


    I really like VM snapshots, but VMs have very heavy overhead, being essentially a computer within a computer.

    Thus, I'm wondering if there's software out there that can provide the same functionality as a VM snapshot without being a VM - something that can save the running state of a program as it currently exists in main memory and then restore the program back to that state at a later time?
      My Computer

  2. FreeBooter's Avatar
    Posts : 3,995
    Windows 10 Pro 64-bit
       #2

    Windows have that feature Hibernation is a state you can put your computer in instead of shutting it down or putting it to sleep. When your computer hibernates, it takes a snapshot of your system files and drivers and saves that snapshot to your hard drive before shutting down.
      My Computer


  3. Posts : 24
    Windows 10 Enterprise
    Thread Starter
       #3

    FreeBooter said:
    Windows have that feature Hibernation is a state you can put your computer in instead of shutting it down or putting it to sleep. When your computer hibernates, it takes a snapshot of your system files and drivers and saves that snapshot to your hard drive before shutting down.
    Uh ok but how does that help me?
      My Computer

  4. FreeBooter's Avatar
    Posts : 3,995
    Windows 10 Pro 64-bit
       #4

    Raident said:
    Uh ok but how does that help me?
    What do you mean?
      My Computer


  5. Posts : 24
    Windows 10 Enterprise
    Thread Starter
       #5

    FreeBooter said:
    What do you mean?
    How does Windows having hibernation help me savestate a program?
      My Computer

  6. FreeBooter's Avatar
    Posts : 3,995
    Windows 10 Pro 64-bit
       #6

    Raident said:
    How does Windows having hibernation help me savestate a program?
    I think you don't understand how VM snapshots works its same as hibernation all current state of running programs save to a file.
      My Computer


  7. Posts : 1,212
    Windows 10 Pro
       #7

    The only way you can save and restore the running state of a program is to save and restore the entire environment in which it is running. That could be by means of a virtual machine or hibernation. There is no other way.

    Applications and their operating environment are not self contained. A good part of it is kernel memory and this cannot be saved and later restored in a workable state. Applications also frequently have internal links to other processes. There is much, much more

    For this to be possible would require a very different kind of OS. It is not Windows, or Linux, or Mac OS, or any OS I am aware of.

    On another forum I have seen a very similar question. It was answered by a true expert. He has Windows source code access and has given training to Microsoft developers on Windows internals. He said it was not possible.
      My Computer

  8. jimbo45's Avatar
    Posts : 10,486
    Windows / Linux : Arch Linux
       #8

    LMiller7 said:
    The only way you can save and restore the running state of a program is to save and restore the entire environment in which it is running. That could be by means of a virtual machine or hibernation. There is no other way.

    Applications and their operating environment are not self contained. A good part of it is kernel memory and this cannot be saved and later restored in a workable state. Applications also frequently have internal links to other processes. There is much, much more

    For this to be possible would require a very different kind of OS. It is not Windows, or Linux, or Mac OS, or any OS I am aware of.

    On another forum I have seen a very similar question. It was answered by a true expert. He has Windows source code access and has given training to Microsoft developers on Windows internals. He said it was not possible.
    Hi there
    Not actually 100% true - although this type of mechanism isn't existing (yet) in Windows.

    If you have a Multi User system e.g Linux then a users applications etc can be stored in its own part of the swap file -- swapping should not be confused with the classical paging file as paging only references memory currently needed for execution whereas swapping will involve the whole of a users "address space". The old IBM mainframe system MVS/SP would allocate TSO users their own address space in swap files so if a system re-start was required the swap files could be restored.

    I can power off (hard - just pull the power plug out) of My Arch Linux system - on restart it restores the session pretty well much to the state it was in before I pulled the plug out - note not a "Software power off". Even any web sites I was on are available. I'm using the XFS file system - a journalling one -- Ms NTFS should be capable of journalling - certainly the FS they use on servers with pooled storage volumes has it.

    Database systems have logs which can be replayed if say an index gets broken or a system re-start required - these though are essentially Background processes -- imagine a commercial enterprise running a large SAP system (these are run as "distributive data bases usually on Linux servers) with maybe 800 possible users or more making loads of purchases, paying invoices etc etc crashing without some sort of decent recovery logging -- a company wouldn't have any idea of where its payments were, what it had ordered, what its customers had ordered etc etc.

    Even simple e-commerce systems must have logging recovery in them.

    Application software running as background processes can of course be designed to have sensible logs on any OS - however user "foreground" tasks are a much more difficult proposition - and that's where the difficulty arises -- Virtual machines can obviously do snapshots but I think as far as Windows is concerned - not possible unless you slow the whole system down by taking frequent "image restore points".

    On really fast and modern hardware the overhead might be acceptable however I don't think yet domestic I/O devices are fast enough for this to be a seamless process even if modern CPU's - especially multi-processors are certainly man enough for the job.

    @FreeBooter

    surely any sort of data saving is a form of "hibernation" - you can't re-start any process whatsoever unless you have saved data somewhere - logging and checkpointing can be made very efficient as you don't need to save the entire contents but probably just changes etc.

    Classical Hibernation means saving the image of the whole system in its entirity and putting it to sleep so it can be 100% restored on wake up - you don't need to do that to recover a lot of processes. Logging ,checkpointing or using swap files etc doesn't require system to "sleep" or even be quiesced. All these can work perfectly well on a running system.

    Cheers
    jimbo
    Last edited by jimbo45; 2 Weeks Ago at 03:52.
      My Computer

  9. AndreTen's Avatar
    Posts : 23,337
    Windows 10 (Pro and Insider Pro)
       #9

    Raident said:
    I really like VM snapshots, but VMs have very heavy overhead, being essentially a computer within a computer.

    Thus, I'm wondering if there's software out there that can provide the same functionality as a VM snapshot without being a VM - something that can save the running state of a program as it currently exists in main memory and then restore the program back to that state at a later time?
    Others already said .. it's not possible at the time. Interesting, this is very similar to a feature I was asking in Feedback hub for years.. but not only for one program, but for a set of programs (their position, state, etc)

    You can get very basic of this via History - Task View
      My Computers

  10. Edwin's Avatar
    Posts : 17,125
    Windows 10
       #10

    Don't more and more programs have a 'Pick up where you left off' feature? Office, for example?

    Heck, even YouTube videos will play from where you left off, when you're signed in.
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 03:21.
Find Us




Windows 10 Forums