[coyotos-dev] Status and roadmap

Jonathan S. Shapiro shap at eros-os.com
Fri Jan 19 12:31:04 CST 2007


On Fri, 2007-01-19 at 16:27 +0000, Sam Mason wrote:
> On Fri, Jan 19, 2007 at 10:29:16AM -0500, Jonathan Adams wrote:
> > On Fri, 2007-01-19 at 14:28 +0000, Sam Mason wrote:
> > > One thing that worries me now is where the kernel gets the memory to
> > > "synthesize a message to be delivered" when the userland scheduler is
> > > activated.  In fact where does this memory come from in the general
> > > case?
> > 
> > The message is a "short" message, which any non-blocked FCRB can receive
> > without needing additional storage.
> 
> OK, I've just noticed the "handler" FCRB in the process state.  In the
> non-activated case the kernel will dispatch to this as normal.  The
> Activated case has the strange wording that I quoted above that doesn't
> make sense to me.

Not so.

In the non-activated case, the kernel cheats and doesn't use an FCRB at
all. It simply delivers to the activation state **as if** there had been
a short-message FCRB. The handler capability is not used. This case can
only arise from an execution exception, and delivery of an execution
exception mechanism happens effectively at higher priority than any
other message delivery.

The handler capability is only used when the process incurs an execution
exception in the activated state.

Note: by "execution exception", I mean as distinct from a message
transfer exception.

> What happens if a process has designated itself as its exception handler
> and faults in a non-activated state, then subsequently faults in the
> activated state while handling the non-activated fault.

Doesn't matter how it got to the activated state. Since it is already in
the activated state, it will not receive the message until it exits the
activated state, which it cannot do because it has ceased to execute
instructions pending resolution of the execution exception.

So: the process ceases to execute instructions.
-- 
Jonathan S. Shapiro, Ph.D.
Managing Director
The EROS Group, LLC
+1 443 927 1719 x5100



More information about the coyotos-dev mailing list