Subj : Re: Lock Free -- where to start To : comp.programming.threads From : Oliver S. Date : Fri Sep 30 2005 06:18 pm > That would be for a small number of threads. Its not the number of threads which may be a problem here, but the number of threads contending for a shared resource, i.e the number of CPUs that have those contending threads running at a certain point in time. And cases where whe have a cache-consistent system with hundreds of threads are extremely rare. > 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. .