Subj : Re: Lock Free -- where to start To : comp.programming.threads From : Joe Seigh Date : Thu Sep 29 2005 08:20 pm David Schwartz wrote: > "Joe Seigh" wrote in message > news:EfSdnUtuDOzwyKHeRVn-vQ@comcast.com... > > >>What happens when you scale to 4 cpu's? > > > The lock-based works *much* better than the lock free. The lock free > allows all four threads to run, totally trashing the FSB. The locks allow > only two threads to run at full speed, which not only get more work done > than all four fighting for the FSB and playing cache ping-pong but also > allow the system to accomplish other useful work as well. > In your rather contrived example, you had the four threads partitioned into 2 threads each doing totally separate work that could just as well be done on separate machines. Then you have one of the threads in each thread pair totally lock out the other so only one thread runs at a time meaning you are only getting the throughput of a single thread. The question is why have two threads in the first place when a single thread would do as well or better? This is the best example you could come up with? -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. .