<?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 Nuts and Bolts of Multithreaded Programming article in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Nuts-and-Bolts-of-Multithreaded-Programming-article/m-p/913021#M4728</link>
    <description>&lt;P&gt;&lt;FONT face="Arial" size="2"&gt;This is a question about Tim Mattson's article entitled &lt;/FONT&gt;&lt;A href="http://www3.intel.com/cd/ids/developer/asmo-na/eng/219575.htm"&gt;&lt;FONT face="Arial" size="2"&gt;Nuts and Bolts of Multithreaded Programming&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Arial" size="2"&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial" size="2"&gt;Assuming you have two threads A &amp;amp; B, how do you tell one core to do A's processing, and the other B's?&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Aug 2006 22:53:35 GMT</pubDate>
    <dc:creator>postaquestion</dc:creator>
    <dc:date>2006-08-28T22:53:35Z</dc:date>
    <item>
      <title>Nuts and Bolts of Multithreaded Programming article</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Nuts-and-Bolts-of-Multithreaded-Programming-article/m-p/913021#M4728</link>
      <description>&lt;P&gt;&lt;FONT face="Arial" size="2"&gt;This is a question about Tim Mattson's article entitled &lt;/FONT&gt;&lt;A href="http://www3.intel.com/cd/ids/developer/asmo-na/eng/219575.htm"&gt;&lt;FONT face="Arial" size="2"&gt;Nuts and Bolts of Multithreaded Programming&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Arial" size="2"&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial" size="2"&gt;Assuming you have two threads A &amp;amp; B, how do you tell one core to do A's processing, and the other B's?&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2006 22:53:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Nuts-and-Bolts-of-Multithreaded-Programming-article/m-p/913021#M4728</guid>
      <dc:creator>postaquestion</dc:creator>
      <dc:date>2006-08-28T22:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Nuts and Bolts of Multithreaded Programming article</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Nuts-and-Bolts-of-Multithreaded-Programming-article/m-p/913022#M4729</link>
      <description>&lt;P&gt;&lt;FONT face="Arial" size="2"&gt;We forwarded this question to the author, who provided the following information:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;If you look at the major APIs for multithreading, youll notice that they dont include a way to assign specific threads to processors. In the overwhelming majority of cases, this would be a bad thing to do. Why? Because the operating system manages all the threads running on the system and goes to great lengths to balance the load. If you start assigning threads to specific processors, you interfere with the OS scheduling, and that is usually not a good idea. &lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;Note that in the overwhelming majority of cases, if your computer isnt busy with other CPU-intensive work, a pair of threads will tend to be assigned to each to the two cores. Hence, you are almost assured of getting the behavior you requested in your question, i.e. one thread to each core.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;By the way, the technical issues behind your question are a frequent topic of conversation among designers of multi-threaded languages. The problem isnt usually with the initial distribution of threads on the system. The OS scheduler does a pretty good job of evenly spreading out the threads. The problem is with the caches. If Ive gone to great lengths to fill my caches with the data they need and then the OS migrates my threads to improve the load balance, my performance could suffer due to all the extra cache misses. This will be even more important on systems with complex cache hierarchies (such as a multiple socket system with multi-core processors in each socket). Hence, you may someday see changes in multithreading APIs to address this issue and somehow lock threads down to processors. This is a controversial topic, however, and it will take a while to work out how APIs need to change (if at all) to address this problem.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;==&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"&gt;Lexi S.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"&gt;IntelSoftware NetworkSupport&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;A href="http://www.intel.com/software"&gt;h
ttp://www.intel.com/software&lt;/A&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;A href="http://www.intel.com/cd/ids/developer/asmo-na/eng/58987.htm"&gt;Contact us&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2006 00:52:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Nuts-and-Bolts-of-Multithreaded-Programming-article/m-p/913022#M4729</guid>
      <dc:creator>Intel_Software_Netw1</dc:creator>
      <dc:date>2006-08-30T00:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Nuts and Bolts of Multithreaded Programming article</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Nuts-and-Bolts-of-Multithreaded-Programming-article/m-p/913023#M4730</link>
      <description>If you are using the OS APIs to create a new thread, some OSes may support something called "processor affinity" for the thread. This could be used to schedule your thread on a particular core. Processor affinity is just a request to the OS scheduler and the OS scheduler may decide to run the thread on any core it deems fit.</description>
      <pubDate>Thu, 14 Sep 2006 14:14:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Nuts-and-Bolts-of-Multithreaded-Programming-article/m-p/913023#M4730</guid>
      <dc:creator>smuthiya</dc:creator>
      <dc:date>2006-09-14T14:14:44Z</dc:date>
    </item>
  </channel>
</rss>

