Article View: es.comp.os.linux.programacion
Article #7478Re: about simple checkpointing
From: Pascal Bourguignon
Date: Thu, 27 Feb 2003 01:18
Date: Thu, 27 Feb 2003 01:18
46 lines
2671 bytes
2671 bytes
"karim bernardet" <bernardet.karim@wanadoo.fr> writes: > Hello, > > I m trying to code a program to do checkpointing (for a simple loop) on > a Linux Intel box (just to understand how it works). To do that, I (try > to) follow what is said for the condor's checkpointing > (www.cc.gatech.edu/classes/cs6761_98_spring/condor.ps). > So I save the data and the stack space (in 2 different files data.dat > and stack.dat). > The data space is from _etext to sbrk(0) (data+bss) and the stack space > from > STACKBOTTOM (which is well defined) to the stack pointer. I save the > stack context too. > The checkpointing is done when the program receive the SIGTSTP signal > and I restart it with the flag 1. > But I can t read the data segment when I restart the code : > > $ ./a.out 1 > Recover ... > Restoring Data Section > data start=134516798 > data size=12226 > HEAP END=134529024 > Problem to read data segment nb=-1 > read: Bad address > > Below I put my code. > Thanks a lot if someone can help me > data_start=(long)&_etext; I may be wrong, but I believe the 'text' is the code of the program, not the data. Memory for the code of the program is usually read-only (because self modifying programs are bad and because it allows sharing the program text between several processes, not to speak of the shared libraries). What about &__data_start or &data_start? (you'd need to rename your local variable). -- __Pascal_Bourguignon__ http://www.informatimago.com/ ---------------------------------------------------------------------- There is a fault in reality. Do not adjust your minds. -- Salman Rushdie
Technical Details
Message-ID:
<87adgicyid.fsf@thalassa.informatimago.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!213.220.35.225!not-for-mailReferences:
<b3j7li$813$1@news-reader11.wanadoo.fr>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f86c8,1f98dfe213fdbb12 X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2003-02-26 17:18:22 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!213.220.35.225!not-for-mail From: Pascal Bourguignon <pjb@informatimago.com> Newsgroups: es.comp.os.linux.programacion Subject: Re: about simple checkpointing Date: 27 Feb 2003 02:18:02 +0100 Organization: informatimago.com Lines: 46 Sender: pascal@thalassa.informatimago.com Message-ID: <87adgicyid.fsf@thalassa.informatimago.com> References: <b3j7li$813$1@news-reader11.wanadoo.fr> NNTP-Posting-Host: 213.220.35.225 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: fu-berlin.de 1046308700 57693005 213.220.35.225 (16 [41911]) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50