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

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

                            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=
ter.
>=20
> No, I don't think it is odd at all.  ;-)
>=20
> > I would MUCH rather use threads, but postgres seems like a better cho=
ice
> > a lot of the time.
>=20
> I'd much rather use multiple communicating processes.
>=20
> 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=
n
> 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.
>=20
> 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.
>=20
> 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=
o
> thread-based programming well vs.  the number of experienced and capabl=
e
> applications programmers who barely know how to spell "thread".  :-)
>=20
> --=20
> =09=09=09=09=09=09=09=09Greg A. Woods
>=20
> +1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robo=
hack.ca>
> Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@we=
ird.com>
--=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
"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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D