Subj : Re: Lock Free -- where to start To : comp.programming.threads From : Joe Seigh Date : Thu Sep 29 2005 03:11 pm Michel wrote: > Joe Seigh wrote: > >> That would be for a small number of threads. 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... >> >> Lock-free is about scalability, not the actual overhead. If you know >> your >> application will never experience high contention or you don't care about >> scalability then you should stick with conventional lock based solutions. > > > > Wouldn't you say there is a design or structural problem having 100-1000 > threads contending for the same lock in any somewhat ordinary > application at the server or the client side? Wouldn't context switching > drain the performance anyways? > Depends on how many processors you have. There may be other things causing context switching also but blocking on a lock certainly isn't going to help performance. -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. .