Our initial idea was to use an existing checkpointer, James Planck's portable libckpt package, and slip it in under a stock JVM. However, libckpt is designed for "well-behaved" scientific processes, those that only make simple demands of the Unix process model. That's what makes libckpt portable.

Libckpt works by saving a little state about open files and the current processor execution context into the heap. Then it writes out an image file containing copies of the current stack, heap, and data segments. This model of the process memory map is common across most Unix variants, and so it's a portable way to view processes.

At recovery time, one re-executes the initial process, but with a "=recover" argument. By starting with the initial process, the system automatically reloads the program text segment (and in fact any shared libraries that were originally loaded at exec() time). The libckpt package reads in the saved stack, heap, and data segments. It reopens files and seeks to the saved seek pointer, then longjmps to the saved process context.