POV-Ray : Newsgroups : povray.off-topic : My hypothesis : Re: My hypothesis Server Time
29 Jul 2024 20:26:39 EDT (-0400)
  Re: My hypothesis  
From: Invisible
Date: 13 Sep 2011 04:31:45
Message: <4e6f14f1$1@news.povray.org>
On 12/09/2011 11:49 PM, Darren New wrote:
> On 9/12/2011 1:13, Invisible wrote:
>> (Think about it; if you did, every multi-threaded application ever
>> written
>> would suddenly break when run on a multi-chip or multi-core setup.)
>
> Not really. You have no more likelihood of breaking because of lack of
> memory barriers than you have of breaking because you've cached
> something in a register during a task switch.
>
> The compiler just has to write memory barrier instructions out when you
> access a volatile variable. That's why the keyword is there.

If you cache something in a register that you shouldn't have, your 
application will break on a uniprocessor system. And you'll notice this, 
and fix it.

If the hardware didn't enforce cache coherence, applications would work 
perfectly on a uniprocessor and then break spectacularly on a 
multiprocessor. This doesn't happen, ergo the hardware is enforcing 
cache coherence.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.