<?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 Please suggest a good starting book for multithreaded programmi in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Please-suggest-a-good-starting-book-for-multithreaded/m-p/856301#M2104</link>
    <description>&lt;BR /&gt;&lt;BR /&gt;Hello gain,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you take a look inside the Object Pascal code of my&lt;BR /&gt;ParallelQueue.pas - you can download lock-free ParallelQueue from &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://pages.videotron.com/aminer/"&gt;http://pages.videotron.com/aminer/&lt;/A&gt;-&lt;BR /&gt;&lt;BR /&gt;You will notice thati am using many queues etc. and i am &lt;BR /&gt;using a hash based method to MINIMIZE contention. &lt;BR /&gt;&lt;BR /&gt;And as i saidand stated before, andthis is a law or theorem&lt;BR /&gt;to apply:&lt;BR /&gt;&lt;BR /&gt;[3] If there is LESS contentionTHEN the algorithmwill&lt;BR /&gt; scale better. Due to the fact thatS(the serial part)become &lt;BR /&gt; smallerwithlesscontention , and as N become bigger, the&lt;BR /&gt; result - thespeedof the program/algorithm... - of theAmadhal &lt;BR /&gt; equation 1/(S+(P/N)) become bigger. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But does Theorem [3]works in reality ?&lt;BR /&gt;&lt;BR /&gt;Of course yes !&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Look at the pop() performance of my lock-free ParallelQueue , &lt;BR /&gt;it does scale better than flqueue and Ringbuffer &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://pages.videotron.com/aminer/parallelqueue/parallelqueue.htm"&gt;http://pages.videotron.com/aminer/parallelqueue/parallelqueue.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;And as i have stated before: &lt;/P&gt;&lt;P&gt;IF you follow and base your reasonning on those theorems &lt;BR /&gt;- or laws or true propositions or good patterns , like theorem [1], [2],[3]... - &lt;BR /&gt;THEN your will construct a model that will be much more CORRECT &lt;BR /&gt;and EFFICIENT. &lt;/P&gt;&lt;P&gt;And it is one of my preferred methodology in programming. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sincerely.&lt;BR /&gt;Amine Moulay Ramdane.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Apr 2010 02:00:56 GMT</pubDate>
    <dc:creator>aminer10</dc:creator>
    <dc:date>2010-04-02T02:00:56Z</dc:date>
    <item>
      <title>Please suggest a good starting book for multithreaded programming....</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Please-suggest-a-good-starting-book-for-multithreaded/m-p/856297#M2100</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;
&lt;P&gt;On Mar 30, 6:24 pm, MC &amp;lt;&lt;A href="mailto:manan.cho...@gmail.com"&gt;manan.cho...@gmail.com&lt;/A&gt;&amp;gt; wrote:&lt;BR /&gt;&amp;gt; Dear all,&lt;BR /&gt;&amp;gt; Following on the post of Srinu. I am very beginner in multithreaded&lt;BR /&gt;&amp;gt; programming. I have been looking for a good book to read about the&lt;BR /&gt;&amp;gt; basic concepts of mutithreading, I recently bought Programming with&lt;BR /&gt;&amp;gt; POSIX threads- by Butenhof. I didnt quite like that book, what I am&lt;BR /&gt;&amp;gt; looking for a is a book which explains multithreaded programming&lt;BR /&gt;&amp;gt; conceptually and also gives good concrete examples. Can anybody please&lt;BR /&gt;&amp;gt; suggest me a book.&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; Thanks,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I will just give an advice...&lt;/P&gt;
&lt;P&gt;To learn more about parallel programming, just read the old posts &lt;BR /&gt;in comp.programming.threads and the other forums that discuss &lt;BR /&gt;parallel programming.. read them carefully - as i did myself - &lt;BR /&gt;and try to use LOGIC and REASON about them and try to EXTRACT &lt;BR /&gt;the good patterns about parallel programming from them and understand &lt;BR /&gt;them...&lt;/P&gt;
&lt;P&gt;Also, try to look at the parallel codes - example&lt;/P&gt;
&lt;P&gt;&lt;A href="http://pages.videotron.com/aminer/"&gt;http://pages.videotron.com/aminer/&lt;/A&gt; and other parallel toolkits ...-&lt;/P&gt;
&lt;P&gt;and extract those good patterns about parallel programming from &lt;BR /&gt;those programming codes and understand them..&lt;/P&gt;
&lt;P&gt;Good patterns about parallel programming are like theorems: &lt;BR /&gt;IF predicates are meet THEN something...&lt;/P&gt;
&lt;P&gt;Once you have extracted those good patterns and understood them , &lt;BR /&gt;you will be more and more professional in parallel programming...&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Read also this:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://pages.videotron.com/aminer/threadpool.htm"&gt;http://pages.videotron.com/aminer/threadpool.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;And try to extract and undertand those good patterns - like theorems &lt;BR /&gt;- &lt;BR /&gt;about Parallel Programming and read this also:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://pages.videotron.com/aminer/parallelhashlist/queue.htm"&gt;http://pages.videotron.com/aminer/parallelhashlist/queue.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;And try to extract and undertand those good patterns - like theorems &lt;BR /&gt;- about Parallel Programming&lt;/P&gt;
&lt;P&gt;And read inside my parallel code:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://pages.videotron.com/aminer/"&gt;http://pages.videotron.com/aminer/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;and the parallel code of others...&lt;/P&gt;
&lt;P&gt;and try to 'EXTRACT' and 'UNDERTAND' those good patterns &lt;BR /&gt;to follow...&lt;/P&gt;
&lt;P&gt;Good patterns about parallel programming are like theorems: &lt;BR /&gt;IF predicates are meet THEN something...&lt;/P&gt;
&lt;P&gt;As an example, take the following page:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/visualizeparallel/"&gt;http://blogs.msdn.com/visualizeparallel/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;As i said before, good patterns about parallel programming &lt;BR /&gt;are like theorems: IF predicates are meet THEN something... &lt;BR /&gt;So, read this:&lt;/P&gt;
&lt;P&gt;"It is critical to be able to spot data parallelism when you see it &lt;BR /&gt;because data parallel algorithms allow the developer to more easily &lt;BR /&gt;construct efficient and safe code. As opposed to the more complex &lt;BR /&gt;solutions employed against task parallelism, data parallelism allows &lt;BR /&gt;the programmer to perform the same operation on each piece of data &lt;BR /&gt;concurrently without concern for race conditions and consequently, &lt;BR /&gt;the need for synchronization, which results in significant &lt;BR /&gt;performance overhead. Arguably, data parallel algorithms perform &lt;BR /&gt;better (due to the lack of synchronization) and are easier for the &lt;BR /&gt;developer to implement."&lt;/P&gt;
&lt;P&gt;So, tell me MC, what can you EXTRACT from this ?&lt;/P&gt;
&lt;P&gt;You can extract something like a theorem to follow, like this:&lt;/P&gt;
&lt;P&gt;[1] IF your algorithm exhibit much more data parallelism THEN &lt;BR /&gt;it will be much more effcient - it will perform better- due to the &lt;BR /&gt;lack of sychronization...&lt;/P&gt;
&lt;P&gt;Hence, if you follow theorem [1]: it will be a good pattern in &lt;BR /&gt;parallel programming - to follow -.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Do you undersand now ?&lt;/P&gt;
&lt;P&gt;You have to be smart and start to extract those theorems &lt;BR /&gt;- good patterns to follow... - from all the programming codes, &lt;BR /&gt;&lt;BR /&gt;articles and forums etc.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Take care...&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Sincerely, &lt;BR /&gt;Amine Moulay Ramdane.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2010 01:53:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Please-suggest-a-good-starting-book-for-multithreaded/m-p/856297#M2100</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2010-04-01T01:53:25Z</dc:date>
    </item>
    <item>
      <title>Please suggest a good starting book for multithreaded programmi</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Please-suggest-a-good-starting-book-for-multithreaded/m-p/856298#M2101</link>
      <description>&lt;P&gt;&lt;BR /&gt;I wrote;&lt;/P&gt;
&lt;P&gt;&amp;gt;As an example, take the following page:&lt;/P&gt;
&lt;P&gt;&amp;gt;&lt;A href="http://blogs.msdn.com/visualizeparallel/" target="_blank"&gt;http://blogs.msdn.com/visualizeparallel/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;gt;As i said before, good patterns about parallel programming &lt;BR /&gt;&amp;gt;are like theorems: IF predicates are meet THEN something...&lt;/P&gt;
&lt;P&gt;&amp;gt;So, read this:&lt;/P&gt;
&lt;P&gt;&amp;gt;"It is critical to be able to spot data parallelism when you see it &lt;BR /&gt;&amp;gt;because data parallel algorithms allow the developer to more easily &lt;BR /&gt;&amp;gt;construct efficient and safe code. As opposed to the more complex &lt;BR /&gt;&amp;gt;solutions employed against task parallelism, data parallelism allows &lt;BR /&gt;&amp;gt;the programmer to perform the same operation on each piece of data &lt;BR /&gt;&amp;gt;concurrently without concern for race conditions and consequently, &lt;BR /&gt;&amp;gt;the need for synchronization, which results in significant &lt;BR /&gt;&amp;gt;performance overhead. Arguably, data parallel algorithms perform &lt;BR /&gt;&amp;gt;better (due to the lack of synchronization) and are easier for the developer&lt;BR /&gt;&amp;gt;to implement."&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;gt;So, tell me MC, what can you EXTRACT from this ?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;gt;You can extract something like a theorem to follow, like this:&lt;/P&gt;
&lt;P&gt;&amp;gt;[1] IF your algorithm exhibit much more data parallelism THEN &lt;BR /&gt;&amp;gt;it will be much more effcient - it will perform better- due to the &lt;BR /&gt;&amp;gt;lack of sychronization...&lt;/P&gt;
&lt;P&gt;&amp;gt;Hence, if you follow theorem [1]: it will be a good pattern in &lt;BR /&gt;&amp;gt;parallel programming - to follow -.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;So, this theorem that i have extracted from the page is important,&lt;BR /&gt;and it's a good pattern to follow...&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;How can this theorem be understood by using mathematical equations ?&lt;/P&gt;
&lt;P&gt;Easy , if your algorithm exhibit more data parallelism THEN the &lt;BR /&gt;proportion of S will be smaller in the Amadhal equation: &lt;BR /&gt;1 / (S + P/N) - N: is the number of processors - hence , &lt;BR /&gt;the algorithm will scale better...&lt;/P&gt;
&lt;P&gt;And as you have noticed , this is what have stated theorem [1]:&lt;/P&gt;
&lt;P&gt;" [1] IF your algorithm exhibit much more data parallelism THEN &lt;BR /&gt;it will be much more effcient - it will perform better- due to the &lt;BR /&gt;lack of sychronization..."&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;That's the same for the other theorems: on deadlock, false sharing etc.&lt;/P&gt;
&lt;P&gt;You have to be smart and start to extract those theorems &lt;BR /&gt;- good patterns to follow... - from all the programming codes, &lt;BR /&gt;articles and forums etc.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Sincerely,&lt;BR /&gt;Amine Moulay Ramdane.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2010 02:51:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Please-suggest-a-good-starting-book-for-multithreaded/m-p/856298#M2101</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2010-04-01T02:51:44Z</dc:date>
    </item>
    <item>
      <title>Please suggest a good starting book for multithreaded programmi</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Please-suggest-a-good-starting-book-for-multithreaded/m-p/856299#M2102</link>
      <description>&lt;P&gt;I wrote:&lt;BR /&gt;&amp;gt;Theorem:&lt;/P&gt;
&lt;P&gt;&amp;gt; [1] IF your algorithm exhibit much more data parallelism &lt;BR /&gt; THEN it will be much more effIcient.&lt;/P&gt;
&lt;P&gt;&amp;gt;How can this theorem be understood by using mathematical equations ? &lt;BR /&gt;&amp;gt;Easy , if your algorithm exhibit more data parallelism THEN the &lt;BR /&gt;&amp;gt;proportion of S will be smaller in the Amadhal equation: &lt;BR /&gt;&amp;gt;1 / (S + P/N) - N: is the number of processors - hence , &lt;BR /&gt;&amp;gt;the algorithm will scale better...&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Finally, i will state this:&lt;/P&gt;
&lt;P&gt;IF you follow and base your reasonning on those theorems &lt;BR /&gt;- or laws or true propositions or good patterns , like theorem [1] - &lt;BR /&gt;THEN your will construct a model that will be much more CORRECT &lt;BR /&gt;and EFFICIENT.&lt;/P&gt;
&lt;P&gt;It is one of my preferred methodology in programming.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Sincerely,&lt;BR /&gt;Amine Moulay Ramdane.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2010 22:26:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Please-suggest-a-good-starting-book-for-multithreaded/m-p/856299#M2102</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2010-04-01T22:26:29Z</dc:date>
    </item>
    <item>
      <title>Please suggest a good starting book for multithreaded programmi</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Please-suggest-a-good-starting-book-for-multithreaded/m-p/856300#M2103</link>
      <description>&lt;P&gt;&lt;BR /&gt;I have wrote:&lt;/P&gt;&lt;P&gt;&amp;gt;Read also this: &lt;BR /&gt;&amp;gt;&lt;A href="http://pages.videotron.com/aminer/threadpool.htm" target="_blank"&gt;http://pages.videotron.com/aminer/threadpool.htm&lt;/A&gt; &lt;BR /&gt;&amp;gt;And try to extract and undertand those good patterns - like theorems &lt;/P&gt;&lt;P&gt;If you look carefully at this page:&lt;/P&gt;&lt;P&gt;&lt;A href="http://pages.videotron.com/aminer/threadpool.htm"&gt;http://pages.videotron.com/aminer/threadpool.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;What can you extract from this page ?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Read for example this, i wrote:&lt;/P&gt;&lt;P&gt;"It uses a lock-free queue for each worker thread and it uses &lt;BR /&gt;work-stealing - for more efficiency "&lt;/P&gt;&lt;P&gt;It's like a law - or a theorem - to follow ..&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;IF you use, in a Thread Pool Engine, a lock-free queue for &lt;BR /&gt;each worker thread , that means that there is LESS contention,&lt;BR /&gt;and, that means also that the percentage S in the Amadhal law &lt;BR /&gt;equation 1 / (S + P/N) - N: is the number of cores/processors - is smaller, &lt;BR /&gt;THEN or HENCE, the algorithm will scale better...&lt;/P&gt;&lt;P&gt;So, as you have noticed, it's like theorems that i have &lt;BR /&gt;followed in my methodology and models.&lt;/P&gt;&lt;P&gt;And of course, work-stealing provides implicitly Load Balancing ,&lt;BR /&gt;so, it's more efficient...&lt;/P&gt;&lt;P&gt;There is another theorem also that can be stated like this, &lt;/P&gt;&lt;P&gt;[2] IF two or more processes or threads use the same critical &lt;BR /&gt; sections THEN they- the processes or threads - must take &lt;BR /&gt; them in the same order toavoid deadlock - in the system - .&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;That's also another theorem to follow...&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;And as i have stated before: &lt;/P&gt;&lt;P&gt;IF you follow and base your reasonning on those theorems &lt;BR /&gt;- or laws or true propositions or good patterns , like theorem [1] or [2] ... - &lt;BR /&gt;THEN your will construct a model that will be much more CORRECT &lt;BR /&gt;and EFFICIENT. &lt;/P&gt;&lt;P&gt;It is one of my preferred methodology in programming. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sincerely.&lt;BR /&gt;Amine Moulay Ramdane.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2010 00:14:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Please-suggest-a-good-starting-book-for-multithreaded/m-p/856300#M2103</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2010-04-02T00:14:03Z</dc:date>
    </item>
    <item>
      <title>Please suggest a good starting book for multithreaded programmi</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Please-suggest-a-good-starting-book-for-multithreaded/m-p/856301#M2104</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;Hello gain,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you take a look inside the Object Pascal code of my&lt;BR /&gt;ParallelQueue.pas - you can download lock-free ParallelQueue from &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://pages.videotron.com/aminer/"&gt;http://pages.videotron.com/aminer/&lt;/A&gt;-&lt;BR /&gt;&lt;BR /&gt;You will notice thati am using many queues etc. and i am &lt;BR /&gt;using a hash based method to MINIMIZE contention. &lt;BR /&gt;&lt;BR /&gt;And as i saidand stated before, andthis is a law or theorem&lt;BR /&gt;to apply:&lt;BR /&gt;&lt;BR /&gt;[3] If there is LESS contentionTHEN the algorithmwill&lt;BR /&gt; scale better. Due to the fact thatS(the serial part)become &lt;BR /&gt; smallerwithlesscontention , and as N become bigger, the&lt;BR /&gt; result - thespeedof the program/algorithm... - of theAmadhal &lt;BR /&gt; equation 1/(S+(P/N)) become bigger. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But does Theorem [3]works in reality ?&lt;BR /&gt;&lt;BR /&gt;Of course yes !&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Look at the pop() performance of my lock-free ParallelQueue , &lt;BR /&gt;it does scale better than flqueue and Ringbuffer &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://pages.videotron.com/aminer/parallelqueue/parallelqueue.htm"&gt;http://pages.videotron.com/aminer/parallelqueue/parallelqueue.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;And as i have stated before: &lt;/P&gt;&lt;P&gt;IF you follow and base your reasonning on those theorems &lt;BR /&gt;- or laws or true propositions or good patterns , like theorem [1], [2],[3]... - &lt;BR /&gt;THEN your will construct a model that will be much more CORRECT &lt;BR /&gt;and EFFICIENT. &lt;/P&gt;&lt;P&gt;And it is one of my preferred methodology in programming. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sincerely.&lt;BR /&gt;Amine Moulay Ramdane.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2010 02:00:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Please-suggest-a-good-starting-book-for-multithreaded/m-p/856301#M2104</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2010-04-02T02:00:56Z</dc:date>
    </item>
    <item>
      <title>Please suggest a good starting book for multithreaded programmi</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Please-suggest-a-good-starting-book-for-multithreaded/m-p/856302#M2105</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hello again,&lt;BR /&gt;&lt;BR /&gt;Sorry for my english , but i will continu to explain - my ideas etc. - &lt;BR /&gt;using logic and reasonning...&lt;/P&gt;&lt;P&gt;As you already know, we have those two notions:&lt;/P&gt;&lt;P&gt;'Time' - we have time cause there is movement of matter -&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;'Space'&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;And we have those two notions that we call 'Correctness' and 'Efficiency'&lt;/P&gt;&lt;P&gt;And . as you have noticed, i have stated the following theorems...&lt;/P&gt;&lt;P&gt;[1] IF your algorithm exhibit much more data parallelism THEN &lt;BR /&gt;it will be much more efficient.&lt;BR /&gt;&lt;BR /&gt;2] IF two or more processes or threads use the same critical &lt;BR /&gt;sections THEN they - the processes or threads - must take &lt;BR /&gt;them in the same order to avoid deadlock - in the system - . &lt;/P&gt;&lt;P&gt;3] If there is LESS contention THEN the algorithm will &lt;BR /&gt;scale better. Due to the fact that S (the serial part) &lt;BR /&gt;become smaller with less contention , and as N become bigger, &lt;BR /&gt;the result - the speed of the program/algorithm... - of the &lt;BR /&gt;Amdahl's equation 1/(S+(P/N)) become bigger. &lt;/P&gt;&lt;P&gt;[4] You have latency and bandwidth , so, IF you use efficiently &lt;BR /&gt;one or both of them - latency and bandwidth - THEN your algorithm &lt;BR /&gt;will be more efficient. &lt;/P&gt;&lt;P&gt;etc. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Why am i calling them theorems ?&lt;/P&gt;&lt;P&gt;You can also call them rules or true propositions, laws ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i can 'classify' theorem [2] in the set that i call 'correctness',&lt;BR /&gt;and it states something on correctness..&lt;/P&gt;&lt;P&gt;And theorems [1] [3] [4] in the set that i call 'efficiency'.&lt;/P&gt;&lt;P&gt;, and they states something on efficiency.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But you have to be smart now..&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If you have noticed, theorem [2] and [3] are in fact &lt;BR /&gt;the same as theorem [4] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But why i am calling them theorems ? &lt;BR /&gt;&lt;BR /&gt;You can call them rules,laws... if you want.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;And as i have stated before: &lt;/P&gt;&lt;P&gt;IF you follow and base your reasonning on those theorems &lt;BR /&gt;- or laws or true propositions or good patterns - like rules or theorems &lt;/P&gt;&lt;P&gt;[1] , [2] , [3], [4]... - THEN your will construct a model that will be much more &lt;/P&gt;&lt;P&gt;CORRECT and EFFICIENT. &lt;/P&gt;&lt;P&gt;It is one of my preferred methodology in programming. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Amine Moulay Ramdane.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="font-family: Arial; font-size: x-small;"&gt;&lt;SPAN style="font-family: Arial; font-size: x-small;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;</description>
      <pubDate>Sat, 03 Apr 2010 23:27:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Please-suggest-a-good-starting-book-for-multithreaded/m-p/856302#M2105</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2010-04-03T23:27:13Z</dc:date>
    </item>
    <item>
      <title>Please suggest a good starting book for multithreaded programmi</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Please-suggest-a-good-starting-book-for-multithreaded/m-p/856303#M2106</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;&lt;P&gt;I am still thinking and using logic...&lt;/P&gt;&lt;P&gt;I can add the following rules also:&lt;/P&gt;&lt;P&gt;[5] IF you are using a critical section or spinlock and there is &lt;BR /&gt;a high contention- with many threads - on them THEN there is a &lt;BR /&gt;possibility of a Lock convoy. Due to the fact that the thread &lt;BR /&gt;entering the spinlock or critical section may context switch &lt;BR /&gt;and this will add to the service time - and to the S (serial part) &lt;BR /&gt;of the Amdahl's equation - and this will higher the contention and &lt;BR /&gt;create a possibility of a Lock convoy and to a bad scalability.&lt;/P&gt;&lt;P&gt;We can elevate the problem in [5] by using a Mutex or a Semaphore&lt;BR /&gt;around the crital section or the spinlock...&lt;/P&gt;&lt;P&gt;Another rule now..&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[6] If there is contention on a lock - a critical section ... - &lt;BR /&gt;and inside the locked sections you are the I/O - example &lt;BR /&gt;loging a message to a file - this will lead the calling thread &lt;BR /&gt;block on the I/O and the operating system will deschedule &lt;BR /&gt;the blocked thread until the I/O completes, thus this situation &lt;BR /&gt;will lead to more context switching, and therefore to an increased &lt;BR /&gt;service time , and longer service times, in this case, means &lt;BR /&gt;more lock contention, and more lock contention means a bad &lt;BR /&gt;scalability.&lt;/P&gt;&lt;P&gt;there is also false sharing etc.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;IF you follow and base your reasonning on those theorems &lt;BR /&gt;- or laws or true propositions or good patterns - like rules or &lt;BR /&gt;theorems [1] , [2] , [3], [4] , [5], [6]... - THEN your will construct a model&lt;BR /&gt;that will be much more CORRECT and EFFICIENT. &lt;/P&gt;&lt;P&gt;And it is one of my preferred methodology in programming. &lt;/P&gt;&lt;P&gt;I will try to add more of those rules , theorems , laws...&lt;BR /&gt;next time... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;BR /&gt;Amine Moulay Ramdane.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Apr 2010 02:48:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Please-suggest-a-good-starting-book-for-multithreaded/m-p/856303#M2106</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2010-04-04T02:48:46Z</dc:date>
    </item>
  </channel>
</rss>

