From owner-freebsd-hackers Thu Oct 19 16:57:27 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id QAA06456 for hackers-outgoing; Thu, 19 Oct 1995 16:57:27 -0700 Received: from alpha.xerox.com (alpha.Xerox.COM [13.1.64.93]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id QAA06451 for ; Thu, 19 Oct 1995 16:57:25 -0700 Received: from gemini.sdsp.mc.xerox.com ([13.231.132.20]) by alpha.xerox.com with SMTP id <17420(5)>; Thu, 19 Oct 1995 16:09:09 PDT Received: from willow.mc.xerox.com (willow.sdsp.mc.xerox.com) by gemini.sdsp.mc.xerox.com (4.1/SMI-4.1) id AA27222; Thu, 19 Oct 95 19:00:23 EDT Received: by willow.mc.xerox.com (4.1/SMI-4.1) id AA03362; Thu, 19 Oct 95 19:00:48 EDT Message-Id: <9510192300.AA03362@willow.mc.xerox.com> To: Julian Elischer Cc: cimaxp1!jb@werple.net.au (John Birrell), mira!sdsp.mc.xerox.com!leisner@werple.net.au, hackers@freebsd.org, jb@cimlogic.com.au Subject: Re: NetBSD/FreeBSD (pthreads) In-Reply-To: Your message of "Thu, 19 Oct 1995 15:46:19 PDT." <199510192246.PAA23918@ref.tfs.com> Date: Thu, 19 Oct 1995 15:58:57 PDT From: "Marty Leisner" Sender: owner-hackers@freebsd.org Precedence: bulk In message <199510192246.PAA23918@ref.tfs.com>, you write: >> I'm curious about why you *need* kernel threads. > >usually it's for several blocking IO streams.. > pthreads handles this... But it does this via (I think...) all I/O being nonblocking, and if it would block it then run another thread.... I haven't looked at the code for a while, but kernel threads would be much more efficient (if a task blocks on I/O, it blocks inside the kernel, rather then muxing on select...) I agree you can implement user-space pthreads efficiently if multiple processor are compute bound...but this is not why you have threads... Also, each kernel call will need context switches, which slow things down... marty