Version française
Home     About     Download     Resources     Contact us    
Browse thread
Problems spawning threads
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Zheng Li <li@p...>
Subject: Re: Problems spawning threads

Hi

Edgar Friendly <thelema314@gmail.com> writes:
> My laptop does a just fine job making and using 503 native threads with
> 512M ram (and lots of big programs already filling that up).  I don't
> believe that their (likely beefier) benchmarking system hits a VM limit
> mine doesn't.
Just made a test, the upper bound of my machine is 381 threads (without
event sync, just start threads and hold). You probably have to wrap some
C function to set pthread's stack size to ~ PTHREAD_STACK_MIN.

> The code should create 503 threads and 503 channels hooked together in a
> ring, and *then* it starts a message (a simple counter) going around the
> ring until it's counted high enough (normal test goes to 20,000,000
> iirc), and then the last task to get the message prints its position.
> None of the threads finish while thread creation continues.
My mistake.

-- 
Zheng Li
http://www.pps.jussieu.fr/~li