Bartosz Milewski Missing post

Jason House jason.james.house at gmail.com
Thu May 28 17:56:29 PDT 2009


Bartosz Milewski Wrote:

> Jason House Wrote:
> 
> > Bartosz Milewski Wrote:
> > 
> > My hobby project is a multi-threaded game-playing AI. My current scheme uses a shared search tree using lockless updates with search results. Besides general ability to use your scheme for what I've already done, I'm also interested in how to overhaul the garbage collector and implementing lockless hashtables (see high-scale-lib on sf.net)
> > 
> 
> I see, you're a hardcore lockfree programmer. All you can expect from D is Sequential Consistency--nothing fancy like C++ weak atomics. But that's for the better.

Far from it! I'm stumbling through in an attempt to teach myself the black art. I'm probably in my 3rd coding of the project. The first incarnation had no threads. The 2nd used message passing. The current one is lockless, but still a work in progress.
 
> > > The complex part is for library writers who have very demanding needs. Unfortunately, I have to describe the whole shebang in my blog, otherwise people won't believe that the system is workable and that it satisfies their high expectations. 
> > 
> > Yeah, I'm waiting for more details like which fences are introduced by the lockless SC requirements. The high-scale-lib is virtually fence free.
> >  
> 
> I don't have much to say about that because it's a know problem and it has already been solved in Java. I can tell you what is required on an x86: use xchg for writes, and that's all. I think Walter has already implemented it, because he asked me the same question. 
> 

What about cmpchx (AKA compare and swap). It occurs in a lot of algorithms. Also, "lock inc" is fundamental to my use of lockless variables.



More information about the Digitalmars-d mailing list