Date: Thu, 14 Nov 1996 15:28:02 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: jgreco@brasil.moneng.mei.com (Joe Greco) Cc: proff@suburbia.net, hackers@FreeBSD.org Subject: Re: Programming technique for non-forking servers? Message-ID: <199611142228.PAA24870@phaeton.artisoft.com> In-Reply-To: <199611141919.NAA25758@brasil.moneng.mei.com> from "Joe Greco" at Nov 14, 96 01:19:10 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> Since most FreeBSD machines are not yet SMP, the advantage of multiple > processors is probably not an issue, so I would most likely not consider > threads on a FreeBSD box... Threading in general has advantages over not threading. *Kernel* threading has advantages in terms of SMP scalability. Whether or not to consider *threading at all* is something that should be done independent of considering *kernel threading in particular*. > Kernel level support for threading (or threads in general, for that matter) > may not be particularly portable in any case. It will be irrelevant, being hidden below a POSIX API, no matter how it is implemented by the underlying system. The POSIX threading uses signals to initiate context switches using a user space threads scheduler. > I guess I would not consider this viable unless someone told me up front > that there was a single platform that was being targeted, and there was > a clear advantage to the use of threads in the given context, and the > thread support on the platform in question was known to be good. The clear advantage is context sharing between multiple threads of execution (which could be processes or threads or whatever) *without* resorting to UNIX IPC, which is (to say the least) arcane. As a side benefit, context switch overhead is reduces between threads in the same thread group (the definition of a process), assuming that you don't implement your threads like SVR4 and Solaris implemented their kernel threads. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611142228.PAA24870>