<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic storing to the same location in Software Tuning, Performance Optimization &amp; Platform Monitoring</title>
    <link>https://community.intel.com/t5/Software-Tuning-Performance/Very-Simple-Concurrency-Coherence-Question/m-p/932244#M1560</link>
    <description>&lt;P&gt;storing to the same location without lock would cause a race condition ,this behavior has got a nature of underterminstic ,to make your code behave&amp;nbsp;as you intend ,syncronization is needed .&lt;/P&gt;</description>
    <pubDate>Wed, 11 Dec 2013 06:47:01 GMT</pubDate>
    <dc:creator>QIAOMIN_Q_</dc:creator>
    <dc:date>2013-12-11T06:47:01Z</dc:date>
    <item>
      <title>Very Simple Concurrency/Coherence Question</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Very-Simple-Concurrency-Coherence-Question/m-p/932243#M1559</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;In reading the memory ordering section of Intel's Combined Software Developer's manual located here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://www-ssl.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf" target="_blank"&gt;https://www-ssl.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Volume 3, Chapter 8, Section 8.2.3.5 (Page 2,115 in that PDF) states:&lt;/P&gt;

&lt;P&gt;[Intra-Processor Forwarding is Allowed]: The memory-ordering model allows concurrent stores by two processors to be seen in different orders by those two processors; specifically, each processor may perceive its own store occurring before that of the other.&lt;/P&gt;

&lt;P&gt;This has always made sense to me in the reference of separate memory locations (as their example shows).&amp;nbsp; However, what if Processor 0 and Processor 1 both issued stores to the &lt;STRONG&gt;same&lt;/STRONG&gt; location but with &lt;STRONG&gt;differing&lt;/STRONG&gt; values.&amp;nbsp; IE:&lt;/P&gt;

&lt;P&gt;[logical processor 0]: mov [_x], 1&lt;/P&gt;

&lt;P&gt;[logical processor 1]: mov [_x], 2&lt;/P&gt;

&lt;P&gt;Literally, the above noted statement would allow for the possibility that [logical processor 0] sees 2 in _x, and [logical processor 1] sees 1 in _x.&amp;nbsp; Obviously cache coherency is designed to not allow that to happen, and I'm sure at the low level this can be explained away in terms of MESI, but is there a section in the manual(s) that outlines this case and specifically states/ensures that both logical processors will come to a coherent value (after store forwarding, etc. happens)?&lt;/P&gt;

&lt;P&gt;The manual is so detailed and helpful that I am sure I am missing something.&amp;nbsp; References would be insanely appreciated as my OCD would certainly be calmed with an official statement that a LOCK prefix isn't needed to ensure total ordering or some other such odd thing in this case.&lt;/P&gt;

&lt;P&gt;Thanks in advance to everyone.&lt;/P&gt;

&lt;P&gt;-Ellis&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2013 03:37:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Very-Simple-Concurrency-Coherence-Question/m-p/932243#M1559</guid>
      <dc:creator>Ellis_H_</dc:creator>
      <dc:date>2013-12-09T03:37:42Z</dc:date>
    </item>
    <item>
      <title>storing to the same location</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/Very-Simple-Concurrency-Coherence-Question/m-p/932244#M1560</link>
      <description>&lt;P&gt;storing to the same location without lock would cause a race condition ,this behavior has got a nature of underterminstic ,to make your code behave&amp;nbsp;as you intend ,syncronization is needed .&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2013 06:47:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/Very-Simple-Concurrency-Coherence-Question/m-p/932244#M1560</guid>
      <dc:creator>QIAOMIN_Q_</dc:creator>
      <dc:date>2013-12-11T06:47:01Z</dc:date>
    </item>
  </channel>
</rss>

