From owner-freebsd-threads@FreeBSD.ORG Sat Oct 22 07:15:48 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CCB216A41F for ; Sat, 22 Oct 2005 07:15:48 +0000 (GMT) (envelope-from jiashiun@gmail.com) Received: from qproxy.gmail.com (qproxy.gmail.com [72.14.204.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A73243D45 for ; Sat, 22 Oct 2005 07:15:47 +0000 (GMT) (envelope-from jiashiun@gmail.com) Received: by qproxy.gmail.com with SMTP id a39so17960qbd for ; Sat, 22 Oct 2005 00:15:46 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MnXBi/d7W3YfBP0eINhCED6eROTxtFo4D4flM1oMAkaC8avCmmktbAtN/lgsCfjHvEDe8+7mqtzdY7CSbV1u74o6+WO6vNZoA/INgojU3KyXS28muX38cBF5t011UMWClzDyTJPnWJ/i8mSEOicSKOWfsTpPe9PrDXuUd8XOGQI= Received: by 10.65.236.18 with SMTP id n18mr23033qbr; Sat, 22 Oct 2005 00:15:46 -0700 (PDT) Received: by 10.65.105.15 with HTTP; Sat, 22 Oct 2005 00:15:46 -0700 (PDT) Message-ID: <1d6d20bc0510220015h5e0c11f7s@mail.gmail.com> Date: Sat, 22 Oct 2005 15:15:46 +0800 From: Jia-Shiun Li To: Eischen , Konstantinos Boukis In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1129939027.43598053423cb@impmail.kcl.ac.uk> Cc: freebsd-threads@freebsd.org Subject: Re: kernel upcall documentation X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2005 07:15:48 -0000 2005/10/22, Daniel Eischen : > 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 an= d 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 protoc= ols > > (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 adde= d 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.