httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Finch <...@dotat.at>
Subject Re: [PATCH] 10x performance increase patch #1
Date Wed, 21 Jul 1999 22:22:55 GMT
Dean Gaudet <dgaudet@arctic.org> wrote:
>
>We haven't completely defined what a "thread" is, but it's definately less
>heavy than a pthread... we don't use any asynchronous notification, for
>example... which gives us the chance to use the lightest possible sproc or
>clone based implementation.  I'm not 100% sure, but I think sprocs are
>lighter than pthreads on irix... similar to the clone/linuxthreads
>relationship.

Hmm, I don't think that is a very accurate explanation of threading
implementations.

SGI's sproc, Linux's clone, and FreeBSD's rfork are basically
equivalent, and they are all just bells & whistles on top of fork,
i.e. they create whole new processes which require a kernel-level
context switch.

Linuxthreads is an implementation of POSIX threads that is based on
the assumption that kernel context switches are fast enough, so one
pthread corresponds to one process. Linuxthreads has been ported to
FreeBSD.

A proper pthreads implementation can do better, because a switch
between two threads within one process can be done much faster than an
interprocess context switch. Solaris and Irix have an N:M pthreads
implementation where the number of processes is less than the number
of threads.

FreeBSD's native pthread library is a purely userland threading system
which has a number of limitations: Dean's MPM that hands off content
delivery to a select loop should be able to do better.

Tony.
-- 
f.a.n.finch   dot@dotat.at   fanf@demon.net
Winner, International Obfuscated C Code Competition 1998

Mime
View raw message