πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #7408

Re: about simple checkpointing

#7408
From: karim bernardet
Date: Thu, 27 Feb 2003 18:01
57 lines
3186 bytes
"Pascal Bourguignon" <pjb@informatimago.com> a οΏ½crit dans le message de
news: 87adgicyid.fsf@thalassa.informatimago.com...
> "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).

thanks for your answer !
according to the book I have, the text zone goes from 0 to _etext, the data
from _etext to _data and the bss from _data to _end ...

Karim


>
> --
> __Pascal_Bourguignon__                   http://www.informatimago.com/
> ----------------------------------------------------------------------
> There is a fault in reality. Do not adjust your minds. -- Salman Rushdie
Technical Details
Message-ID: <b3ljrv$1vn$1@news-reader12.wanadoo.fr>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!wanadoo.fr!not-for-mail
References: <b3j7li$813$1@news-reader11.wanadoo.fr> <87adgicyid.fsf@thalassa.informatimago.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f86c8,1f98dfe213fdbb12
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-02-27 10:02:40 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!wanadoo.fr!not-for-mail
From: "karim bernardet" <bernardet.karim@wanadoo.fr>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: about simple checkpointing
Date: Thu, 27 Feb 2003 19:01:20 +0100
Organization: Wanadoo, l'internet avec France Telecom
Lines: 59
Message-ID: <b3ljrv$1vn$1@news-reader12.wanadoo.fr>
References: <b3j7li$813$1@news-reader11.wanadoo.fr> <87adgicyid.fsf@thalassa.informatimago.com>
NNTP-Posting-Host: amarseille-206-1-23-19.abo.wanadoo.fr
X-Trace: news-reader12.wanadoo.fr 1046368959 2039 81.51.157.19 (27 Feb 2003 18:02:39 GMT)
X-Complaints-To: abuse@wanadoo.fr
NNTP-Posting-Date: 27 Feb 2003 18:02:39 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000