Hibernating MATLAB process (not WINDOWS itself) running natively under WINDOWS?

2 views (last 30 days)
Is it possible under any current release of MATLAB, or planned under a forthcoming release of MATLAB (such as R2014A or R2014B) to hibernate a MATLAB process running natively under WINDOWS without hibernating WINDOWS itself? If it can be done under any version of MATLAB under any version of WINDOWS, please so indicate.
There are use cases in which it would be nice to be able to hibernate a MATLAB process, but in which hibernating WINDOWS is not desired. For instance, if running as a dual boot system with LINUX, you don't want to hibernate WINDOWS before rebooting into LINUX, so that the WINDOWS NTFS partition can be mounted under LINUX. Or some other part of the WINDOWS session might be in need of rebooting, but a long-running MATLAB process might be in fine shape.
Of course, if MATLAB is running in a virtual machine, then the whole virtual machine can be hibernated, but that is not what I'm asking about here.
Thanks.

Accepted Answer

Jan
Jan on 16 May 2015
No, it is not possible under the current Matlab versions. This is not only a missing feature of Matlab, but other applications cannot be hibernated also. While hibernating a complete real or virtual machine conserves the current state and can be woken up, it is impossible to conserve the state of a single program: The memory e.g. used for the variable cannot be recreated at the same locations, because the memory can be used by other applications already.
  3 Comments
Mark Stone
Mark Stone on 16 May 2015
Actually, it would be nice if there were an auto-hybernate on WINDOWS shutdown option, so that when WINDOWS decides to do an update and reboot your machine in the middle of the night, it doesn't kill your MATLAB session.
Jan
Jan on 17 May 2015
@Mark: My Windows does not shutdown automatically. But in one of the labs I've worked in the IT staff decides to shutdown the machines forcedly at 12 o'clock to install OS updates. This was extremely mad when during the examination of a patient.
When I create a function, which runs for a longer time (eg. weeks), I consider this in the design of the software: The current state of the variables and the program is saved in MAT files, such that the program can be restarted from a specific point. This allows for a debugging also.
@Walter: Does this mean, that you can recreate the complete status of a specific program? There is no chance to confuse the memory manager with modified addresses? Does this work reliably e.g. with FEX: sharedmatrix? Other problems could be:
  • Opened (memory mapped) files when the files have been changed by another program?
  • Open serial ports, when the device has been disconnected since teh hibernation of the program.
  • Data stored in the GPU might not match into the available memory anymore afer waking up.
  • What about the behaviour of timer objects?
There are many problems, which require a decision of the wanted behavior at first, such that I'm convinced that a general program-hibernation is much more complicated than a machine hibernation (which does not work reliably with network connections and external devices also). So a user-defined storing of the intermediate state will be the best method in my opinion.

Sign in to comment.

More Answers (0)

Categories

Find more on Specifying Target for Graphics Output in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!