On Tue, Dec 05, 2000 at 10:07:37AM +0100, Zeugswetter Andreas SB wrote:
> > And using the following program for timing thread creation 
> > and cleanup:
> > 
> > #include <pthread.h>
> > 
> > threadfn() { pthread_exit(0); }
> 
> I think you would mainly need to test how the system behaves, if 
> the threads and processes actually do some work in parallel, like:
> 
> threadfn() {int i; for (i=0; i<10000000;) {i++}; pthread_exit(0); }

The purpose of the benchmark was to time how long it took to create and
destroy a process or thread, nothing more.  It was not creating
processes in parallel for precisely that reason.  The point in dispute
was that threads took much less time to create than processes.

> In a good thread implementation 10000 parallel processes tend to get way less 
> cpu than 10000 parallel threads, making threads optimal for the very many clients 
>case
> (like > 3000).

Why do you believe this?  In the "classical" thread implementation, each
process would get the same amount of CPU, no matter how many threads was
running in it.  That would mean that many parallel processes would get
more CPU in total than many threads in one process.
-- 
Bruce Guenter <[EMAIL PROTECTED]>                       http://em.ca/~bruceg/

PGP signature

Reply via email to