Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Oct 1995 15:58:57 PDT
From:      "Marty Leisner" <leisner@sdsp.mc.xerox.com>
To:        Julian Elischer <julian@ref.tfs.com>
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) 
Message-ID:  <9510192300.AA03362@willow.mc.xerox.com>
In-Reply-To: Your message of "Thu, 19 Oct 1995 15:46:19 PDT." <199510192246.PAA23918@ref.tfs.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9510192300.AA03362>