[coyotos-dev] Space banks

Jonathan S. Shapiro shap at eros-os.org
Sun Nov 6 13:24:17 EST 2005


On Sun, 2005-11-06 at 09:31 -0700, Christopher Nelson wrote:
> On the Hurd list Jonathan mentioned that a “client” passes a space
> bank to a “server” in order for that server to provide services for
> the client and not exhaust its own.  I don’t really see how providing
> memory to a server solves that problem, since the server still needs
> to have the memory mapped into its address space in order to do any
> work on it....

There are few servers that need to do this. For those that do, here is a
quick sketch of an answer -- I'm in the middle of kernel hacking, and I
don't want to do a full context switch at the moment.

First, remember that "buying storage" includes address space mapping
structures, so if we have a client with a mappable region, the client is
paying for both the pages and the PATTs necessary to organize those
pages.

Second, the usual practice in the case you are thinking about is for the
application to set up a collection of "windows" that it uses to perform
on-demand mappings of client subspaces. This is generally done by
inserting the client space's root capability somewhere into the server
address space on a temporary basis.

So the server pays for the metadata needed to support a fixed number of
address space mapping windows. This is a fixed cost, not a per-client
cost.

There is a little more needed to explain how the server can obtain the
needed capability from the client, but this is the key element of the
answer to your question.



shap




More information about the coyotos-dev mailing list