Author: Robert Hyatt
Date: 20:01:01 09/16/99
Go up one level in this thread
On September 16, 1999 at 05:07:52, David Blackman wrote: >On September 15, 1999 at 09:00:08, Robert Hyatt wrote: > > >>But it is improving bit by bit. Tim Mann suggested a new hashing scheme that >>is cute for SMP users, as it effectively eliminates the Lock()/UnLock() calls >>without the danger of incorrect hash results. > >This is not at all difficult and i'm pretty sure a few programs have been doing >it for years. It get's a bit harder if you rely on the (shared) hash table to do >detection of repetitions, or to count how many CPUs are currently active below a >given node (some parallel algorithms rely on knowing this). I have never used the main hash table for draw detection. I once upon a time used a small hash table, but for SMP work I like the move list, because the repetition list (or repetition hash table) must be private for each CPU or you get some wild errors... > >But then, lock/unlock are not extremely slow on most modern hardware if you use >inline assembler and avoid using system calls. Maybe a problem for the fast/dumb >brigade. They don't have to be slow, because they are hit at _every_ node... and on any machine they have to effect a memory barrier to make sure that all writes are done before the lock is set, and then make sure all writes finish before the unlock is cleared... But there aren't many SMP search programs... I only know of Cray Blitz, Ferret, Crafty, Diep, and eventually junior/fritz if they release one. This isn't something that is done very frequently. Many more programs do parallel search on distributed systems where locks aren't needed because the message-passing provides the necessary synchronization since there is no shared memory of any kind... In Cray Blitz, I did traditional lock/unlock, although the Cray did have a very fast hardware instruction for this, as the 'locks' were bits in a semaphore register, and not memory-resident...
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.