[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: startup code

From: Johan Rydberg
Subject: Re: startup code
Date: Sun, 19 Oct 2003 01:16:44 +0200

Marcus Brinkmann <address@hidden> wrote:

: > The startup code is responsible for brining the program, or at least
: > parts of it, into memory before the real pager can take control.
: We do on demand paging.  The startup code must include a minimal initial
: pager, that will serve all page faults that happen when the execution is
: passed to the startup of the main program.  The startup code can not predict
: which pages of the executable are needed until the program is completely
: self-paged without the help of the startup code.

Of course it will use on-demand paging, that was why I said it had
to bring "parts of it" into memory.  

: > It 
: > also must allocate a new stack for the initial thread, and pass along 
: > information to the new pager when it is ready.
: No, the executable can allocate its own stack.  Until it has, it can use the
: startup codes small stack.

: The information needs to be passed.  In fact, it can be on the stack as
: function arguments.

Do you mean the bootstrap information, the same that was passed to the
startup code?  I refered to the information collected by the initial
pager.  The new pager installed by the application must get use that
information, so that it will not bring in data twice into memory.

This could be done by letting the new pager send a "shutdown" message to
the initial pager, which will reply will were the new pager can find
the information and after that simply kill itself since it is no longer

Of course the other information has to be passed aswell.  That could
be done on the stack, or in a register.  I prefer the latter case,
since then we can use the normal SVR4 ABI for passing arguments on
the stack (where the actual data is located is deteremined by the
parent, but it will probably live at the top of the initial stack.)

: I suggest to develop the protocol as if the bootstrap case doesn't exist.
: We can always tweak it later to fit the bootstrap case as a special case,
: too.  For example, information that does not make sense at bootstrap can be
: set to 0 or flags can indicate the presence of certain fields.

The only special thing that is needed for the bootstrap case is mentioned
below: that the data is already in the container. 

Another issue is that the task-server is not yet alive, but that
has nothing to do with getting the program into memory (except it
has to find a way to spawn the initial pager thread.)

: > Wortel creates bootstrap containers for the bootstrap servers.  These
: > containers all the physical memory for the server.  Wortel passes section
: > information with the bitmap full, leting the startup code know that all
: > data is already in the container.
: > This eliminates the need for the physmem server to act as a backing 
: > storage server for the boostrap servers.

Johan Rydberg, Free Software Developer, Sweden
http://rtmk.sf.net | http://www.nongnu.org/guss/

Playing Lady & Bird - The Morning After

reply via email to

[Prev in Thread] Current Thread [Next in Thread]