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
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
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 Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!