>
> Can somebody ran this simple test program on Linux 2.1.x
> and report results? Or tell what is wrong with the test?
>
> Regards,
> Dmitriy Budko [EMAIL PROTECTED]
>
>
> From: Angus Mackay <[EMAIL PROTECTED]>
>
> > >well, here is the code. please tell me what I have done wrong in regards to
> > >the 1023 problem if you can.
> > What versions of Linux kernel, glibc and gcc did you use?
>
> I have tryed it on glibc-2.0.7 with both gcc-2.7.2 and egcs-2.8.1, and
> under LynxOS 3.0 (that is the RTOS we use were I work).
>
> under Linux it allows me to create 1 less than PTHREAD_MAX_THREADS which
> is understandable considering when you link with pthreads main then
> takes two threads, only one of which is a pthread.
>
> I have tried putting a sleep(1) in mythread, it takes 1023 seconds but it
> still fails. under LynxOS it fails at 97. under solaris it has worked
> with over 100000 threads(quite fast too:
> (amackay@hydra)~/tmp$ time ./pt 100000 > /dev/null
> 6.231u 0.292s 6.524real 99.98% )
>
I got this on Linux 2.1.130 with glibc 2.1 beta:
# nohup time a.out 100000
# tail nohup.out
thread 99993 reporting
thread 99994 reporting
thread 99995 reporting
thread 99996 reporting
thread 99997 reporting
thread 99998 reporting
thread 99999 reporting
13.04user 32.46system 0:46.23elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (93major+8minor)pagefaults 0swaps
It is on a Pentium 133 with 64MB RAM.
--
H.J. Lu ([EMAIL PROTECTED])