Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: POSIX threads

Author: Steven Edwards

Date: 11:54:38 07/05/05

Go up one level in this thread


On July 05, 2005 at 05:02:54, Lance Perkins wrote:

>Not true.
>
>Testing a multi-threaded app on a single-cpu machine is bogus. Its very easy to
>write a multi-threaded app. Its a no brianer. But to be sure that it actually
>works on a multi-cpu machine, you have to test it on one.
>
>On a single-cpu machine, the threads never run in parallel. A shared resource
>will never be accessed simultaneously.

Wrong.  You are limiting the concept of a shared resource to a single memory
access.  A shared resource may be an entire table or even an executable object.
Without protection by, say, a POSIX mutex, a program on a single processor
machine running multiple threads may fail.



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.