checkpoint/restart

Matthew Dillon dillon at apollo.backplane.com
Wed Oct 8 21:17:56 PDT 2003


:cvs diff: Diffing .
:Index: signalvar.h
:===================================================================
:RCS file: /home/dcvs/src/sys/sys/signalvar.h,v
:retrieving revision 1.5
:diff -r1.5 signalvar.h
:63a64,65
:>         sig_t    ps_checkpoint;         /* place to store checkpoint/restore upcall */
:>         sig_t    ps_restore;

    sigacts has the ps_sigact[] array which I believe contains
    128 signals by default.  Since only 32 some odd signals are defined,
    there are plenty of signals available for your checkpoint and restore
    vectors (though I still think there is only a need for a checkpoint
    signal, since the restore can simply resume the signal handler from
    the point where it called freeze()).  There are other little cleanups
    you can do, but I'm sure you are already aware of them (e.g. converting
    those macros like READ_CHECK into inlines and removing
    non-argument-passed dependancies).

    I've played with it a bit, I think you are making excellent progress!
    You even made it a kld.  Wow.

    We need to add a stty signal similar to how ^\ core's a program, to
    checkpoint a program.  That would be so cool.

    Am I correct in that currently the program binary that was checkpointed
    must do the restore?  I tried writing a little program that restore'd
    another program's checkpoint file but it seg faulted.  So, presumably,
    the next step is to save and restore filesystem-based file descriptors
    so as to reacquire the original text image.  That's a fairly tough nut
    to crack, but the result will be incredibly powerful.

						-Matt






More information about the Kernel mailing list