Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Saving a process state periodically and restoring it on some system crash
Hi,
I planning to do it this way : Write a signal handler for the timer
signal recvd by a process, and every fixed period of time write the
process state ( the text portion, data portion, stack segment and
processor state, open file descriptors )to a file and  at a system
crash, read in the file and restore the state.
So this would require any program to be compiled with the process-
-state-save-and-restore-library .Any pointers in this direction would
be highly appreciated.
Thanks,
Prakash

Report this thread to moderator Post Follow-up to this message
Old Post
Prakash Prabhu
09-09-04 09:00 PM


Re: Saving a process state periodically and restoring it on some system crash
"Prakash Prabhu" <prakash.prabhu@gmail.com> wrote in message
news:85a4cc05.0409090952.4c41ec70@posting.google.com...
> Hi,
> I planning to do it this way : Write a signal handler for the timer
> signal recvd by a process, and every fixed period of time write the
> process state ( the text portion, data portion, stack segment and
> processor state, open file descriptors )to a file and  at a system
> crash, read in the file and restore the state.
> So this would require any program to be compiled with the process-
> -state-save-and-restore-library .Any pointers in this direction would
> be highly appreciated.

Prakash,

Do you plan to do it at system-level or application-level. If at system
level take a look at http://ftg.lbl.gov/checkpoint. Its a open source check
pointing effort available for most kernels. If at application level, take a
look at condor checkpointing library.

HTH,
Pirabhu



Report this thread to moderator Post Follow-up to this message
Old Post
Pirabhu Raman
09-10-04 01:56 AM


Re: Saving a process state periodically and restoring it on some system crash
>I planning to do it this way : Write a signal handler for the timer
>signal recvd by a process, and every fixed period of time write the
>process state ( the text portion, data portion, stack segment and
>processor state, open file descriptors )to a file and  at a system
>crash, read in the file and restore the state.
>So this would require any program to be compiled with the process-
>-state-save-and-restore-library .Any pointers in this direction would
>be highly appreciated.
>Thanks,
>Prakash

There is some known non-state-of-the-art (translation: it didn't
work very well) in saving and restoring process state in games such
as 'rogue' and 'hack'.  The problems come when you start saving
stuff and you don't know what you're saving (such as internal data
from C library open files, the termcap library, etc.).  The result
was a game which could save state, but you could only restore a
limited number of times (it ran out of FILE entries, since it didn't
know it could re-use them on restart), an ever-growing stack frame,
and an ever-growing data space on each restore.  Also, all heck
broke loose if you ever tried to run it on a terminal different
from what you started on, because the termcap routines knew that
they had determined the terminal type, and never checked it again.

Summary:  it works a lot better if you know what you're saving/restoring
and don't save and restore stuff you don't know about.

Gordon L. Burditt

Report this thread to moderator Post Follow-up to this message
Old Post
Gordon Burditt
12-24-04 02:03 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Unix Programming archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:03 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.