Subject: Re: Driver and thread model
To: =?iso-8859-1?Q?Thorbj=F6rn_Jemander?= <>
From: Manuel Bouyer <>
List: tech-kern
Date: 09/13/2000 23:04:26
On Tue, Sep 12, 2000 at 07:28:29AM +0200, Thorbjörn Jemander wrote:
> Sureley the scheduler preempts the processes (is that the term
> used in NetBSD?) in userland?

Yes, of course.

> Do you mean that processes in
> the kernel run uninterrupted?

They can be interrupted by hardware interrupts, unless the current process has
blocked them (it can). But the kernel won't switch to a new process unless the
current process calls tsleep() or returns from syscall.

> Does that go for modules loaded
> into the kernel, too?


> >once you're in kernel you run until you return from syscall or you call
> >tlseep(), or a highter priority interrupt occurs.
> Where can I find out more about the kernel internals (without figuring
> it out from the source), any papers or books covering the subject?

"Design and implementation of 4.4BSD" is a good book.
You can also look at in the doc section

> I think I saw that NetBSD implements POSIX-threads somewhere,
> I wonder how they are implemented: as mapped to some sort of
> 'native' threads or adopted and implementeted as /the/ thread
> implementation...?

I'm not sure I understant what you mean. For now there are different thread
packages for NetBSD, but none of them ship with NetBSD. All of them are
implemented in userland, without kernel support, as wrappers around
libc calls and using (I think but I may be wrong) signals.

Manuel Bouyer <>