Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Threads

Author: Dave Gomboc

Date: 07:21:21 04/08/99

Go up one level in this thread


On April 08, 1999 at 02:24:46, Bruce Moreland wrote:

>
>On April 08, 1999 at 00:28:11, Dave Gomboc wrote:
>
>>If the resource that you are waiting on is being used by a process that is
>>blocked, then block, otherwise spin.  Does that make sense?  It assumes that one
>>can tell which process has control of the resource.  I am far from an expert in
>>this area.
>
>You'd hope that a thread wouldn't block while it has control of a resource.
>
>These multithreading/multiprocessing discussions are interesting, but it's
>confusing trying to figure out exactly what we are talking about.

Right, I was thinking of the more general case where processes may be accessing
several resources.

>The original example some time ago involved not writing into a hash element
>while someone else is reading from it or writing to it.
>
>There are also issues of thread synchronization when dividing search work.

If you have only a low number of processors (<=4), why lock at all?  Have you
tried doing _nothing_ for hash table synchronization?  If the error rate isn't
too high, maybe you can get away with it.  High performance increase, suffering
the chance that occasionally, you will blunder fantastically.  Maybe play a
series of games and see if a blunder actually ever backs things up to the root.
(Play such a series *before* you go to the WCCC. :-)

The more processors you have, the more need there will be to lock hash table
entries.  Also, disk I/O is a completely different ball game.

Dave Gomboc



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.