kernel upcall documentation

Jia-Shiun Li jiashiun at gmail.com
Sat Oct 22 00:15:48 PDT 2005


2005/10/22, Daniel Eischen <deischen at freebsd.org>:
> On Sat, 22 Oct 2005, Konstantinos Boukis wrote:
>
> > I tried not to bombard you with all the information of what I am doing but it
> > seems inevitable ;-). I am working on a theoretical research project and the
> > goal is to develop a mobile terminal (e.g. one that changes network
> > continuously) that will be able to adapt to the offered mobility protocols
> > (i.e. like Mobile IP) offered by the network. In my implementation the kernel
> > identifies the offered protocol and installs the appropriate modules.
>
> There are other examples to look at, like devd.  Actually, I don't
> see why you can't just use devd.  From devd(8):
>
>     "Another example would be for devd to use a table to locate and load via
>      kldload(8) the proper driver for an unrecognized device that is added to
>      the system."

the 'upcall' looks more like a Linux way to me, for example the Linux
hotplug mechanism. In general Linux tends not to separate kernel and
userland jobs that clear. It is an example to call userland programs
directly from kernel. One other is the proc fs. Probably because the
kernel (implementers) does not really have much control over user
program so they want to do all jobs themselves.

But just like Daniel said, there are other ways to do the same thing
and make the duties of each parts clear. Kernel sees what happen,
notify and leave the decision of responding action to userland.
Defining interfaces (events in this example) is the key.

Jia-Shiun.


More information about the freebsd-threads mailing list