l4-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Re: emulating no-senders notifications in L4?


From: Espen Skoglund
Subject: Re: Re: Re: emulating no-senders notifications in L4?
Date: Wed, 26 Dec 2001 19:02:50 +0100

[Ondrej Hurt]
>> Of course, if there's no valid exception handler installed it can
>> be pretty hard to detect such faulty tasks.  It can be done through
>> other ways of monitoring the task, though.  The faulting task can
>> also be given a new exception handler at a later point in time,
>> enabling the exception to be caught when that happens.

> IMHO this is exactly the reason why the exception handler should be
> reliable (i.e. reside in some system server like 'exec'). Otherwise
> you would have to poll each task to check if it is alive, wouldn't
> you ? With exceptions being delivered reliably to some task manager,
> the system will be told about all faults.

You're free to set the exception handler to some external entity if
you want to.  The application is also free to mess itself up if it
wants to, but this is not really a big issue since the application
itself is the only one to suffer from the messup.

Realizing that the application is allowed to mess itself up, there's
really no problem with also letting an intra-task exception handler do
all the proper handling and potentially send a "I'm completely messed
up, please kill me" message to some task server.  The only reason I
can think for using an external exception handler is for robustness
reasons---there's less chance of accidentally messing up the exception
handler itself.

> I think that worse performace (inter-task IPC instead of intra-task
> IPC) is not an issue here as exceptions do no occur often and tasks
> are killed in response to them.

It's not only an issue of intra-task versus inter-task IPC
performance.  For some exceptions one must also have complete access
to all state of the faulting thread (register contents, etc.).  This
state is not necessarily visible for external entities and the
exception handler must therefore sometimes temporarily switch the
execution of the faulting thread to some predefined intra-task
exception handling routine.  For other exceptions one might need
access only to state which is also accessible to other threads within
the same address space.  One example of this scenario is where one
only need to access the instructions executed by the faulting thread.
Clearly, for these types of exceptions there is no need to redirect
the execution of the faulting thread in order to handle the exception.
The exception can simply be handled within exception handler thread
itself.

The performance of exception handlers might not be an issue in a Hurd
system, but L4 is designed to perform reasonably well in mostly all
systems, and some of these systems might rely heavily on exceptions
(think instruction emulation).


        eSk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]