Subject: Re: Thread Performance in NetBSD
To: NetBSD User's Discussion List <>
From: Marina Brown <>
List: netbsd-users
Date: 01/12/2002 02:52:08
Dear Greg:

   Thanks for the answer. I'm struggling to learn system programming righ=

                            Marina Brown ;-)


On Fri, 11 Jan 2002, you wrote:
> [ On Thursday, January 10, 2002 at 23:51:44 (-0500), Marina Brown wrote=
: ]
> > Subject: Re: Thread Performance in NetBSD
> >
> > It's odd how sometimes the more antiquated ways like forking work bet=
> No, I don't think it is odd at all.  ;-)
> > I would MUCH rather use threads, but postgres seems like a better cho=
> > a lot of the time.
> I'd much rather use multiple communicating processes.
> Threads have their places, but those are usually within OS kernels and
> maybe in a very tiny number of applications where multiple events need
> to give the impression of proceeding smoothly and simultaneously (which
> almost always means only in user interfaces and maybe some real-time
> interfaces, though indeed a very few types of communications systems ca=
> also benefit from multiple light-weight threads when shared memory and
> system semaphores are too expensive to use).  I don't think a database
> engine has to use threads, provided it's designed in such a way that it
> doesn't suffer from the cost of the IPC mechanisms it uses.
> Programming (correctly and safely) for threads is known to be very much
> more difficult than just programming for simple unthreaded processes,
> even when you need several or many of the latter an they must all
> communicate and co-operate correctly and safely themselves.
> There have been many debates about this in many circles (including in
> formal academic publications), but I think the best demonstration is a
> count of the number of experienced and capable kernel programmers who d=
> thread-based programming well vs.  the number of experienced and capabl=
> applications programmers who barely know how to spell "thread".  :-)
> --=20
> =09=09=09=09=09=09=09=09Greg A. Woods
> +1 416 218-0098;  <>;  <>;  <woods@robo=>
> Planix, Inc. <>; VE3TCP; Secrets of the Weird <woods@we=>
"You need only reflect that one of the best ways to get yourself a
reputation as a dangerous citizen these days is to go about repeating=20
the very phrases which our founding fathers used in their struggle for
independence" -- Charles A. Beard (1874-1948) US historian =20