[Top][All Lists]

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

Re: Swapping pagers out

From: address@hidden
Subject: Re: Swapping pagers out
Date: Fri, 11 Feb 2005 15:38:40 +0100
User-agent: Internet Messaging Program (IMP) 3.2.4

Marcus Brinkmann <address@hidden> wrote:

> How does all of this answer your question?  Well, as soon as we have
> this, physmem could in fact be made to swap out the whole task (except
> for active DMA regions).  So, the constraints you mention that follow
> from the tex document in the source would not apply anymore.

I don't think that any "default" pager should be able to swap out data
(because the task may have data it doesn't want to be paged out to the
swap, e.g. for security reasons, remember cached passwords).

I assume a pager is able to swap out correctly all of the task data
and text, also with the data that represents page mapping for the task.
However, the pager in this form is rather useless, so it should decide
to "de-activate" itself by orderly swapping out its data and text. Just
before deallocating the last page (the one holding the instruction
pointer, which should at that time be somewhere near the beginning of
the page), the pager asks the memory server to set its guaranteed
pages to zero so they can be reused and sets its pager to some "other"
thread. The page is then unmapped, which makes the thread fault.

A system where this scheme would apply is obviously sufficiently
complex to need a specialized server to make scheduling decisions.
It may not be a good place to put that "other" pager thread, however it
should somehow be informed that a task has been swapped out. Recieving
a page fault is such an implicit message.

Indeed, a task that has completely been swapped out is not schedulable,
but if the scheduler decides to schedule the task in spite of this
(normally because memory is again available), it has to negotiate some
memory for this task, to allow it to run. The disabled pager thread is
then scheduled, which makes it fault. The "other" pager loads the last
page that has been swapped out, it should contain code to restore the
main pager code so that operation can be properly resumed.

I also feel that such a scheme could be used for task creation, since a
task could start as a form of "swapped out image". The first thing to
run would then be the pager thread.


reply via email to

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