Subj : Re: Lock Free -- where to start To : comp.programming.threads From : Joe Seigh Date : Fri Sep 30 2005 05:32 pm Oliver S. wrote: > >>If probability of lock contention for a single thread is .001 in >>your example, then for 100 threads it's about .100, 200 threads >>about .199, 1000 threads about .630, etc... > > > If you're handing over items to other threads in that granularity, > you are doing something wrong. In those cases it's smarter to push > a block of items to the queue and to pop about the same number of > items from the queue at one time. So this problem (which only would > occur on extremely large machines) is eliminated. Well, until 2010 anyway. That's when Intel claims 100 core processors will be commonly available. Individual cores probably won't be much faster than they are now. If you want better performance than you have now, you'll have to figure out how to do it with more threads. If you know how to do that and keep synchronization low enough so the exponential contention doesn't become a problem then good. Otherwise too bad I guess. -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. .