Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: POSIX threads

Author: Zappa

Date: 05:33:21 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.
>
>I have tons of horror stories about this from newbie programmers.

In *theory* you can get a significant fraction of the race conditions running on
a single cpu machine, because each thread will be preempted and then restarted,
and this has *in theory* can produce the same kinds of possible instruction
orders as a multiprocessor machine.

But in practice you are 100% right :(

anthony



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.