nadiasvertex at gmail.com
Tue May 22 15:46:49 EDT 2007
On 5/22/07, Jonathan S. Shapiro <shap at eros-os.com> wrote:
> On Tue, 2007-05-22 at 14:12 -0400, Christopher Nelson wrote:
> > Umm. Chris? The memory overhead of the activation handler is
> > actually
> > *higher* than the memory overhead of the external handler...
> > Seriously? Then I have a misunderstanding about activation handlers.
> > My impression of their function was like this:
> > MMAP - 1 per process (1 total)
> > Stack - 1 per thread (N total for N threads)
> Not sure what you mean by MMAP here. Can you expand?
I meant memory map, indicating the address space constructs as a whole.
> Recall when comparing that there are two independent issues here:
> 1. The cost of the U->S->U transition
> 2. The cost of the address space switch
> When people quote cswitch times, they generally lump these together. Of
> the two, the address space switch is the dominant cost. In EROS and
> Coyotos, we don't incur that cost if the invoker and invokee share the
> same address space.
I was assuming that, with an external fault handler, address space switching
was required, but with an activation handler it was not. So I was thinking
just in terms of U->S->U for activation handlers, and in terms of complete
context switch for external handlers.
> Yes. That is: your shared stack assumption is incorrect. It is a
> feasible design, but it effectively precludes having the activation
> handler be responsible for page faults. Since page faults are by far the
> most common fault that a process incurs, that pretty much defeats
> activation handlers.
I wasn't thinking about page faults to fill in the stack. If they don't do
that, you have to have another mechanism to do it... which is silly.
If you have to have additional storage for each activation handler
per-thread, then it seems like the only additional overhead for the extern
handlers is the address space mapping.
Of course, external handlers have to handle their own faults for their own
memory requests anyways. So moving that complexity really only seems to
move it. Don't you still have to have additional memory overhead per
external handler for guaranteed space so that the fault handler can handle
it's own memory faults?
w/o spending too much time on me, can you outline why activation handlers
require more memory overhead than external handlers?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the coyotos-dev