[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: Threads vs Processes?
On Sun, Nov 19, 2000 at 10:19:40PM +0530, Arsalan Zaidi wrote:
> > If you're shooting for performance, use pthreads and hope that each
> > platform will map it to the most optimal thing.
> Would your advice change if I said that the program's main target platform
> is Linux and *BSD?
No. My advice still remains the same - use pthreads.
> What kind of process / thread performance do we have there?
On Linux, the best you can do is clone() - the only workable userland
interface for this pthreads.
On BSD, there is a similar interface called rfork(), but there is no
native userland interface to it. The best you can do is to use
linuxthreads (a linux pthreads emulation lib, that maps clone -> rfork).
However, the current thinking in the BSD land is that both user land
and kernel land threads are inferior to a technology called scheduler
activations. There has been much talk, but no (working) code to date.
And then there are people (esp the older kernel types) who think that
threads are a bad idea in the first place.