[coyotos-dev] Status and roadmap
Jonathan Adams
jwadams at eros-os.com
Fri Jan 19 11:19:52 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.
No; in the non-activated case, the fault is delivered *to the process
which is faulting*'s activation handler. Unless there is a fault in
the activation handler itself, no external keeper is involved in fault
processing.
> 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. Does the FCRB
> get overwritten by the activated fault, and the previous message get
> lost? Potentially confusing the handler when it tries to resume itself
> after handling the exception it recieved while activated.
Remember that a process can have multiple FCRBs. In this particular
case, the first fault would be delivered directly to the process'
activation handler, without using any kind of FCRB. If the activation
handler faulted while processing the first fault, a message is sent to
the handler FCRB.
If the handler FCRB is *blocked*, then the process will block waiting
for it to become unblocked. If the handler FCRB is *unblocked*, then it
will be sent the fault message.
At this point, if the handler FCRB points to the process, we will
deadlock, since the activation handler will never run to process the
"fault" message.
Does that make sense?
Cheers,
- jonathan
More information about the coyotos-dev
mailing list