Subj : Re: Lock Free -- where to start To : comp.programming.threads From : Sergey P. Derevyago Date : Wed Oct 05 2005 08:00 pm Joe Seigh wrote: > > Unfortunately, some "lock free" algorithms make long loops (e.g. make some > > progress, determine that some critical data was concurrently touched and start > > the "progress" once again) and it's not so obvious that there can be no real > > progress as well. > > If a lock-free algorithm loops that usually means some other thread is > making progress. > Usually isn't equal to always, is it? > Looping would be a problem for wait-free algorithms > if there wasn't a bound on the number of loops but it's not a problem > for lock-free algorithms. > > Non lock-free algorithms usually loop waiting for a specific action by some > other thread. If lock-free algorihtms loop it's because their waiting for > some interval of no actions by other threads. > IMHO even correctly implemented lock free algorithms don't solve fundamental MT problems: if you really have to concurrently modify some data then you really have to implement some synchronization scheme and this scheme doesn't come for free. Frankly, I consider the lock free approach as "make frequent event faster but get rare event be slower". Sometimes the whole program runs faster, sometimes it don't... -- With all respect, Sergey. http://ders.angen.net/ mailto : ders at skeptik.net .