image provider

Hibernation (Suspended Animation) Fast Program Load


Disclaimer

This essay does not describe an existing computer program, just one that should exist. This essay is about a suggested student project in Java programming. This essay gives a rough overview of how it might work. I have no source, object, specifications, file layouts or anything else useful to implementing this project. Everything I have prepared to help you is right here.

This project outline is not like the artificial, tidy little problems you are spoon-fed in school, when all the facts you need are included, nothing extraneous is mentioned, the answer is fully specified, along with hints to nudge you toward a single expected canonical solution. This project is much more like the real world of messy problems where it is up to you to fully the define the end point, or a series of ever more difficult versions of this project and research the information yourself to solve them.

Everything I have to say to help you with this project is written below. I am not prepared to help you implement it; or give you any additional materials. I have too many other projects of my own.

Though I am a programmer by profession, I don’t do people’s homework for them. That just robs them of an education.

You have my full permission to implement this project in any way you please and to keep all the profits from your endeavour.

Please do not email me about this project without reading the disclaimer above.

This project is not really a student project. It is more a project for Bill Gates or someone in charge of an operating system.

Have you noticed how modern programs take longer and longer to start up and shut down, even with the fastest CPU (Central Processing Unit) s? You might be tempted to just leave them running, so that when you come back to them, they are instantly ready to go. There are several problems with that.

  1. Other programs can’t get at the files they have open.
  2. They clutter up your task bar.
  3. They use some CPU, even when idling.
What I want to do is create a program state half way between running and not running, called hibernation or suspended animation. From the point of view of the user, the program would not be running at all. Yet when he went to restart it, it would be instantly ready to go, exactly where he last left off.

When an application program goes into suspended animation, it first closes all its files and I/O devices. Then it calls the SUSPEND API (Application Programming Interface) of the operating system. The operating system then permanently reserves that the part of the swap file that the application was using. It will eventually swap all real RAM (Random Access Memory) contents to the disk swap file. It does not have to complete that until a power down. It takes the program off the task bar. From the user’s point of view, the program has stopped running.

When the user starts the app up again, the operating system notices that it has that program in suspended animation. It does not need to start a fresh copy. The operating system just starts executing the app right after the SUSPEND API call. It need load only one page into RAM. The application program wakes up. All its virtual RAM is exactly as it left it, including any giant trees of persistent objects.

The virtual RAM will gradually get paged back into real RAM. The app has to reopen its files and reopen its I/O devices and carry on. It need do nothing to preserve state. It can do this restart very rapidly compared with a traditional program load.

The main disadvantage is you tie up system swap space, even when the program is not running, but since hard disk space is becoming so cheap, this is no longer an issue.

In summary there are two advantages for the user:

  1. Programs start instantly.
  2. Programs pick up right where you left off.
You could simulate this without OS (Operating System) support, by copying your virtual RAM space to and from an ordinary file, or using facilities of the OS to map a file into the VRAM (Video RAM) space. This project is similar to the Gespenster fast JVM load.
Gespenster Fast JVM load

This page is posted
on the web at:

http://mindprod.com/project/suspendedanimation.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\project\suspendedanimation.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[3.138.34.93]
You are visitor number