From owner-freebsd-hackers Mon Jun 28 1:34: 4 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id 758F814D01 for ; Mon, 28 Jun 1999 01:33:57 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id BAA18397; Mon, 28 Jun 1999 01:32:53 -0700 (PDT) (envelope-from dillon) Date: Mon, 28 Jun 1999 01:32:53 -0700 (PDT) From: Matthew Dillon Message-Id: <199906280832.BAA18397@apollo.backplane.com> To: "Daniel J. O'Connor" Cc: hackers@FreeBSD.ORG, Warner Losh , Julian Elischer Subject: Re: "restricted" kernel threads implementation from NetBSD via n References: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG : :I don't suppose someone could post an explanation of how kernel threads work :could they? :) : :I sort of grasp the idea but I'm wondering what passes for context switches and :stuff like that.. What does the switching between threads etc? Or am I :completely off track? : :--- :Daniel O'Connor software and network engineer Basically switching between kernel threads is the same as switching between processes except that you do not need to mess with the MMU or other complex scheduling elements, so switching between kernel threads can be made almost as fast as a simple subroutine call. A kernel thread can be thought of as a cheaper process. Threads are often called "tasks". The terminology is the same, but still distinct from "process". This is key to being able to vector an interrupt to a kernel thread. The interrupt code must already save much of the process context, adding a little extra glue to turn it into a kernel thread that we can actually switch-away from should theoretically be very cheap. -Matt Matthew Dillon :for Genesis Software - http://www.gsoft.com.au :"The nice thing about standards is that there :are so many of them to choose from." : -- Andrew Tanenbaum : :--_=XFMail.1.3.p0.FreeBSD:990628173909:1295=_ :Content-Type: application/pgp-signature : :-----BEGIN PGP MESSAGE----- :Version: 2.6.3ia : :iQCVAwUBN3ctpWj0TqzKxF7VAQE5uAP/SDvpI6TZJuDt0FfHfe0Eqp90QD2gjk2R :nTrDhLsP/vMey3Ogsc/LeFNww8woaqXwTD6x3i+04wzkoDvti7rlczi4+2DUfnAj :79lflMw7DdBgd9tYB/3+QTQ3o2BVpT2JZK8zHVX5cPiPKHcPwQl7DhojQeqBx0QU :W7ZKnn2ZYqI= :=SXMo :-----END PGP MESSAGE----- : :--_=XFMail.1.3.p0.FreeBSD:990628173909:1295=_-- :End of MIME message : : :To Unsubscribe: send mail to majordomo@FreeBSD.org :with "unsubscribe freebsd-hackers" in the body of the message : To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message