Re: sleep is not working to avoid starvation among threads of same priority

2008-10-07 Thread Jeremy Chadwick
On Tue, Oct 07, 2008 at 03:34:41PM +0530, Rajeshwar Patil wrote: > I have two threads of same priority lets say thread A and thread B, > thread A is starving since thread B has got a for loop of size 100k. > So, to avoid starvation I am processing 1000 iterations of for > loop(that of thread B) in

sleep is not working to avoid starvation among threads of same priority

2008-10-07 Thread Rajeshwar Patil
Hi, I have two threads of same priority lets say thread A and thread B, thread A is starving since thread B has got a for loop of size 100k. So, to avoid starvation I am processing 1000 iterations of for loop(that of thread B) in one batch and giving sleep of 1ms, but still thread A is starving

sleep is not working to avoid starvation among threads of same priority

2008-10-07 Thread Rajeshwar Patil
Hi, I have two threads of same priority lets say thread A and thread B, thread A is starving since thread B has got a for loop of size 100k. So, to avoid starvation I am processing 1000 iterations of for loop(that of thread B) in one batch and giving sleep of 1ms, but still thread A is starving