Subject: Re: NetBSD in Set top box
To: None <tech-embed@netbsd.org>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-embed
Date: 05/10/2000 08:52:47
On Wed, May 10, 2000 at 02:20:12PM +0200, anders.dinsen@lasat.com wrote:

 > and I think the MIT robot contest still uses the NetBSD kernel. In theory Linux
 > has one advantage over NetBSD when it comes to Java: that it supports kernel
 > threads (as cloned processes, but since Unix processes are almost as lightweight
 > as threads in other OS's, efficiency is fine). Kernel threads (along with a
 > threaded kernel) enables Java threads to take advantage of an SMP environment.

A couple corrections/clarifications:

	(1) The LinuxThreads model of one-process-per-thread (tho they
	    all share address space, file descriptors, etc.) is actually
	    well-known to be an inefficient threads model.  Linux processes
	    are far from "lightweight", and even true LWPs as found on
	    Solaris and, in a slightly different form, Tru64 UNIX (OSF/1)
	    are still too heavy when you want to scale to many threads.

	    Also, LinuxTreads is unable to implement some of the
	    semantics required by POSIX as a side-effect of its
	    fundamental nature... needless to say, I don't think
	    very highly of LinuxThreads.

	(2) The Linux kernel is `threaded' only to the extent that the
	    NetBSD kernel is.  That is, each process is a thread of
	    execution in the kernel, and they run either to completion
	    (return to userspace) or until they explicitly yield (e.g.
	    tsleep() in the NetBSD kernel).  Neither kernel is fully
	    preemptive (NetBSD-current does have a few special case
	    preemption points, but it is far from a general solution).

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>