From owner-freebsd-hackers Thu Oct 19 16:43:40 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id QAA06026 for hackers-outgoing; Thu, 19 Oct 1995 16:43:40 -0700 Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id QAA06021 for ; Thu, 19 Oct 1995 16:43:37 -0700 Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id QAA03590; Thu, 19 Oct 1995 16:34:05 -0700 From: Terry Lambert Message-Id: <199510192334.QAA03590@phaeton.artisoft.com> Subject: Re: NetBSD/FreeBSD (pthreads) To: julian@ref.tfs.com (Julian Elischer) Date: Thu, 19 Oct 1995 16:34:05 -0700 (MST) Cc: cimaxp1!jb@werple.net.au, leisner@sdsp.mc.xerox.com, hackers@FreeBSD.ORG, jb@cimlogic.com.au In-Reply-To: <199510192246.PAA23918@ref.tfs.com> from "Julian Elischer" at Oct 19, 95 03:46:19 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1042 Sender: owner-hackers@FreeBSD.ORG Precedence: bulk > > I'm curious about why you *need* kernel threads. > > usually it's for several blocking IO streams.. It also buys you competition for a single threaded process as if it were multiple processes. For a threaded process that use to be multiple processes (ie: NFS daemons, etc.), this allows "fairer" competition for process quantum than would otherwise be the case. Identical function with no gratuitous blocking (I/O isn't necessarily the only blocking operation: wait(), etc.) when there is at least one thread capable of running requires n==m for an n:m mapping of user to kernel threads. It's a neat problem to think about. I have a process (but not a formula) for determining throuput/efficiency based on ratios of n:m. This problem is almost exactly analogous to loop-unrolling parallelization of a process for SMP and/or treading of predicate-inependent I/O across multiple I/O channels. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.