[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
27 Nov 2001 18:58:01 +0100
address@hidden (Niels Möller) writes:
> Lars Reuther <address@hidden> writes:
> > Our memory management consists of two main elements, dataspace
> > managers and region mappers. Dataspaces are container for any kind of
> > memory (files, anonymous memory, ...). They are managed by dataspace
> > managers (e.g. file systems, anonymous memory managers,
> > ...). Dataspaces can be attached to regions of the address space of a
> > L4 task.
> > Region mappers are pager threads, usually we use one region mapper in
> > each L4 task which is the pager for all other threads of that
> > task. The region mapper doesn't resolve the pagefault itself, instead
> > it looks up the dataspace which is attached to the pagefault address
> > and calls the dataspace manager which manages that dataspace to map
> > the appropriate page.
> Sounds cute. But one question: What happes if the task is completely
> swapped out? I.e. when none of the pages in it's dataspaces are
> assigned to physical management? How can it get swapped in again? I
> guess you're keeping the code and data needed by the pager thread in
> physical memory, somehow.
You have to make sure that the region mapper gets somehow swapped in
again. Because a thread can't page itself, the region mapper thread
must be paged by someone else, e.g. by a the task loader.
> The code pages can be shared between tasks, I guess.
Binaries are also dataspaces. In fact, binaries are mapped to several
dataspaces, at least one dataspace for code, data and bss. The code
and data dataspaces can be shared with copy-on-write, bss is anonymous
memory. The same applies to shared libs.
Dipl.-Inf. Lars Reuther Dresden University of Technology
Department of Computer Science Operating Systems Research Group
Phone: +49 (351) 463-38401 Fax: +49 (351) 463-38284
- L4Env, Ian Duggan, 2001/11/20