Subject: Re: Dual Proc
To: Chad Milios <chad@b9media.net>
From: Bill Studenmund <wrstuden@netbsd.org>
List: port-macppc
Date: 08/09/2002 08:54:27
On Fri, 9 Aug 2002, Chad Milios wrote:

> ok i'm just a curious non-techincal newbie, but does darwin/ppc run the
> kernel concurrently on multiple processors? does any 'nix? if so, what
> is an example of two tasks the kernel could be doing concurrently? are
> these foolish and simple questions? do you consider the kernel to be
> strictly that which is not a process (below ALL processes) or do you
> consider low-level processes like init and the vm pager and the like to
> be part of the "kernel code"? if other 'nix OSes can run kernel code on
> multiple processors concurrently what holds netbsd back?

I'm not sure about darwin.

An example of two tasks in the kernel would be two different web server
threads sending data out at the same instant. i.e. they both are executing
the write() system call at the same time. We don't support that. What will
happen is that the second one will wait for the first to finish.

What "holds us back" is that to support two different processes say in the
write() system call at the same time requires fine-grained locking of data
in the kernel. If you get that locking wrong, the kernel will probably
deadlock.

Take care,

Bill