Hibernation (Suspended Animation) Fast Program Load Hibernation (Suspended Animation) Fast Program Load
home Student Projects no local find frame, full screen Google search web for topic jump to footer translate with Babelfish by Roedy Green ©1996-2008 Canadian Mind Products
This essay is about a suggested student project in Java programming. This essay gives a rough overview of how it might work. It does not describe an actual complete program. I have no source, object, specifications, file layouts or anything else useful to implementing this project. Everything I have to say to help you with this project is written below. I am not prepared to help you implement it; I have too many other projects of my own.

I do contract work for a living, which could include writing a program such as this. However, 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 any way you please.

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 CPUs? 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 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 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 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 space. This project is similar to the Gespenster fast JVM load.
Gespenster Fast JVM load

CMP_homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.18] The information on this page is for non-military use only.
You are visitor number 3,875. Military use includes use by defence contractors.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/project/suspendedanimation.html J:\mindprod\project\suspendedanimation.html