From owner-freebsd-hackers Sun Oct 10 15:11: 5 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from dingo.cdrom.com (castles509.castles.com [208.214.165.73]) by hub.freebsd.org (Postfix) with ESMTP id 4C27815239 for ; Sun, 10 Oct 1999 15:10:57 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.9.3/8.8.8) with ESMTP id PAA08093; Sun, 10 Oct 1999 15:02:09 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Message-Id: <199910102202.PAA08093@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: James Howard Cc: freebsd-hackers@freebsd.org Subject: Re: KLDs In-reply-to: Your message of "Fri, 08 Oct 1999 19:14:17 EDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 10 Oct 1999 15:02:09 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Slashdot, in a discussion regarding QNX, someone described it with the > following: > > Under QNX, if your driver crashes, the kernel just restarts it. > > After reading it, I became more interested in KLDs. My only prior > experiece was installing the Linux KLD and that was done by a port. You should note that neither QNX nor FreeBSD exhibit the above behaviour. KLD is a linker; it allows you to link more stuff into the kernel after it's been started. It doesn't implement a coprocess model of any sort. > Anyway, in an effort to learn, I decided to KLD-ify EXT2FS support. It > took about 20 minutes and works great, but I still do not know how KLDs > work. :) I think the general idea is that you're not meant to worry about it. 8) If you're in need of more information, I can really only direct you to the sources. > (I submitted the patch in kern/14217, if someone could look at > it, that would be swell. I've been able to mount, read, write and umount > without any problems) (noted) > Anyway, back to the point, if it is this so simple (is it?), how much of > the kernel can be KLDs? It would be interesting to see a kernel so small > that all it had was KLD support in it and everything else was a module. Indeed it would. There's some fairly strong resistance to this being the _only_ way that FreeBSD works, but the level of modularity you describe is certainly a goal we are working towards. > Has anyone else thought about this? Is this a good idea? Is this a > bad idea? Yes, Yes, Yes. > How fundamentally different would this be from > a microkernel? Very. There is only one protection domain in the FreeBSD kernel, and KLDs live inside it. > Could things be done in such a way that like QNX, it can > kill and restart a misbehaving driver? What other cool things can be > done? QNX doesn't do that. We can't either, unfortunately. The limits on "cool things" are so wide that listing them here would be extremely tiring. 8) -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message