Restoring the Pthread manager

From: Paul H. Hargrove (PHHargrove_at_lbl.gov)
Date: Tue Aug 27 2002 - 16:15:21 PDT


It is a HORRIBLE hack, but I am now able to rewrite the pthread internal
data structures with new pids after a restart, and rebuild the pipe used
to talk to the manager.

This is all done from user space and is a real mess because pthreads
tries very, VERY hard to make sure its internals are not exposed.  It
will fail in all sorts of corner cases and is only intended as a
stop-gap solution.

This SHOULD be enough to get the pthread manager working again after a
restart.  However, the only testing has been with threads continuing
past a checkpoint, not with a real restart.

To enable this code add -DCR_PTHREAD_HACK to EXTRA_CFLAGS in
libcr/Makefile

Of course, we are still working on doing this correctly from the kernel
(rebuilding pipes and restoreing pids).

-Paul

> Action items
>
> Paul:
DONE PHH 8/26/2002 > + Finish cr_task_{get,put}
DONE PHH 8/27/2002 > + figure out how to fake pthread manager from user
space (libcr)
DONE PHH 8/26/2002 > + rethink cr_dest_{get,put} interface
>
> Eric:
> + Oops on MT restart
DONE PHH 8/26/2002 > + cleanup duct tape so coredump works again
DONE PHH 8/26/2002 > + cr_dest_get: remove semaphore (unless Paul gets
there first)
> + cr_src_{get,put}
> + cr_restart (user space) getop() -f
> + writeup vmadump stuff and send to Hendricks
> + fix up paper
> + add 'depend' and 'test' targets to vmadump Makefile
> + fix vmadthread test code
> + MOD_USE_COUNT code
>
> Jason:
> + Opts parsing for cr_save
> + vmadump for UML
> + shared UML install in n2001:/usr/local/pkg/
> + install n2001 & n2003
>
> Unknown (probably Eric):
> + restort pids
> + save/restore pipes

-- 
Paul H. Hargrove                          PHHargrove_at_lbl_dot_gov
NERSC Future Technologies Group           Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory     Fax: +1-510-495-2998