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

조회 수: 2 (최근 30일)
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.

채택된 답변

Jan
Jan 2015년 5월 16일
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
Mark Stone
Mark Stone 2015년 5월 16일
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 2015년 5월 17일
@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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by