<?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 About concurrent hashtable and Dmitry distributed rwlock... in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/About-concurrent-hashtable-and-Dmitry-distributed-rwlock/m-p/993951#M6327</link>
    <description>&lt;DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Sorry for my english i will try to explain;&lt;BR /&gt;&lt;BR /&gt;I have 
read the 
following:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://groups.google.com/group/lock-free/browse_thread/thread/3e5c4ab767fac7f8" target="_blank"&gt;http://groups.google.com/group/lock-free/browse_thread/thread/3e5c4ab767fac7f8&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Nicola 
wrote:&lt;BR /&gt;&lt;BR /&gt;"Hi sunqxj, &lt;BR /&gt;&lt;BR /&gt;hash tables are data structures that wok well 
with concurrent access. &lt;BR /&gt;If you have too much collisions probably you are 
using a wrong sized &lt;BR /&gt;table or the hash function is not working properly on 
your data set. &lt;BR /&gt;In addition, for space locality, you might consider a vector 
instead &lt;BR /&gt;of a list of collisions, especially if the values to be stored are 
&lt;BR /&gt;small enough. &lt;BR /&gt;&lt;BR /&gt;From the concurrency point of view, please don't 
forget to avoid false &lt;BR /&gt;sharing and do not consider reader-writer mutex that, 
as shown in &lt;BR /&gt;Dmitriy site, prevent also readers from scaling linearly on a 
&lt;BR /&gt;multi-core architecture. &lt;BR /&gt;&lt;BR /&gt;Nicola" &lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;Ad as you have noticed i&amp;nbsp; have wrote parallelhashlist (a parallel 
hashtable),&lt;BR /&gt;you can find&amp;nbsp;parallelhashlist here:&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;A href="http://pages.videotron.com/aminer/"&gt;http://pages.videotron.com/aminer/&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;It's a parallel Hashtable with O(1) best case and O(log(n)) worst case 
&lt;BR /&gt;access that uses lock striping and lightweight MREWs(multiple-readers&lt;/DIV&gt;
&lt;DIV&gt;-exclusive-writer) , this allows multiple threads to write and read 
concurently. &lt;/DIV&gt;
&lt;DIV&gt;also parallelhashlist maintains an independant counter , that counts the 
number &lt;/DIV&gt;
&lt;DIV&gt;of entries , for each segment of the hashtable and uses a lock for each 
counter, &lt;/DIV&gt;
&lt;DIV&gt;this is also for better scalability. and parallelhashlist in scaling very 
well, &amp;nbsp;but since&lt;/DIV&gt;
&lt;DIV&gt;it&amp;nbsp;is a parallel hashtable so the possibility of&amp;nbsp;contention is low so why 
do &lt;/DIV&gt;
&lt;DIV&gt;i need the&amp;nbsp;distributed reader-writer lock of Dmitry Vyukov inside my 
parallel hashslit ? &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;other than that I have done some tests with the&amp;nbsp;lightweight MREW that i am 
&lt;/DIV&gt;
&lt;DIV&gt;using inside my parallelhashlist and i have done also some tests with my 
lockfree mpmc &lt;/DIV&gt;
&lt;DIV&gt;fifo queue and what i think is that the CAS is generating a lot of 
contention this is is why&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;the lightweight MREW and my lockfree_mpmc is not scaling , 
but&amp;nbsp;parallelhashlist is &lt;/DIV&gt;
&lt;DIV&gt;scaling very well cause i am using lock-striping that is lowering 
contention.&lt;BR /&gt;&lt;BR /&gt;What&amp;nbsp;are doing Dmitry Vyukov&amp;nbsp;in&amp;nbsp;his distributed rwlock is 
lowering &lt;BR /&gt;the contention using the same method as lock striping that i am 
using inside &lt;/DIV&gt;
&lt;DIV&gt;parallelhashlist it is why it is scaling, but there is still a possibility 
of contention &lt;/DIV&gt;
&lt;DIV&gt;in his distributed rwlock that can cause a problem to the scalability if 
there is &lt;/DIV&gt;
&lt;DIV&gt;too many threads and not a sufficient number of rwlocks in the Dmitry 
distributed&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;rwlock to be able to lower the contention. &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Amine Moulay Ramdane.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Sun, 26 Aug 2012 00:48:18 GMT</pubDate>
    <dc:creator>aminer10</dc:creator>
    <dc:date>2012-08-26T00:48:18Z</dc:date>
    <item>
      <title>About concurrent hashtable and Dmitry distributed rwlock...</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/About-concurrent-hashtable-and-Dmitry-distributed-rwlock/m-p/993951#M6327</link>
      <description>&lt;DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Sorry for my english i will try to explain;&lt;BR /&gt;&lt;BR /&gt;I have 
read the 
following:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://groups.google.com/group/lock-free/browse_thread/thread/3e5c4ab767fac7f8" target="_blank"&gt;http://groups.google.com/group/lock-free/browse_thread/thread/3e5c4ab767fac7f8&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Nicola 
wrote:&lt;BR /&gt;&lt;BR /&gt;"Hi sunqxj, &lt;BR /&gt;&lt;BR /&gt;hash tables are data structures that wok well 
with concurrent access. &lt;BR /&gt;If you have too much collisions probably you are 
using a wrong sized &lt;BR /&gt;table or the hash function is not working properly on 
your data set. &lt;BR /&gt;In addition, for space locality, you might consider a vector 
instead &lt;BR /&gt;of a list of collisions, especially if the values to be stored are 
&lt;BR /&gt;small enough. &lt;BR /&gt;&lt;BR /&gt;From the concurrency point of view, please don't 
forget to avoid false &lt;BR /&gt;sharing and do not consider reader-writer mutex that, 
as shown in &lt;BR /&gt;Dmitriy site, prevent also readers from scaling linearly on a 
&lt;BR /&gt;multi-core architecture. &lt;BR /&gt;&lt;BR /&gt;Nicola" &lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;Ad as you have noticed i&amp;nbsp; have wrote parallelhashlist (a parallel 
hashtable),&lt;BR /&gt;you can find&amp;nbsp;parallelhashlist here:&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;A href="http://pages.videotron.com/aminer/"&gt;http://pages.videotron.com/aminer/&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;It's a parallel Hashtable with O(1) best case and O(log(n)) worst case 
&lt;BR /&gt;access that uses lock striping and lightweight MREWs(multiple-readers&lt;/DIV&gt;
&lt;DIV&gt;-exclusive-writer) , this allows multiple threads to write and read 
concurently. &lt;/DIV&gt;
&lt;DIV&gt;also parallelhashlist maintains an independant counter , that counts the 
number &lt;/DIV&gt;
&lt;DIV&gt;of entries , for each segment of the hashtable and uses a lock for each 
counter, &lt;/DIV&gt;
&lt;DIV&gt;this is also for better scalability. and parallelhashlist in scaling very 
well, &amp;nbsp;but since&lt;/DIV&gt;
&lt;DIV&gt;it&amp;nbsp;is a parallel hashtable so the possibility of&amp;nbsp;contention is low so why 
do &lt;/DIV&gt;
&lt;DIV&gt;i need the&amp;nbsp;distributed reader-writer lock of Dmitry Vyukov inside my 
parallel hashslit ? &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;other than that I have done some tests with the&amp;nbsp;lightweight MREW that i am 
&lt;/DIV&gt;
&lt;DIV&gt;using inside my parallelhashlist and i have done also some tests with my 
lockfree mpmc &lt;/DIV&gt;
&lt;DIV&gt;fifo queue and what i think is that the CAS is generating a lot of 
contention this is is why&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;the lightweight MREW and my lockfree_mpmc is not scaling , 
but&amp;nbsp;parallelhashlist is &lt;/DIV&gt;
&lt;DIV&gt;scaling very well cause i am using lock-striping that is lowering 
contention.&lt;BR /&gt;&lt;BR /&gt;What&amp;nbsp;are doing Dmitry Vyukov&amp;nbsp;in&amp;nbsp;his distributed rwlock is 
lowering &lt;BR /&gt;the contention using the same method as lock striping that i am 
using inside &lt;/DIV&gt;
&lt;DIV&gt;parallelhashlist it is why it is scaling, but there is still a possibility 
of contention &lt;/DIV&gt;
&lt;DIV&gt;in his distributed rwlock that can cause a problem to the scalability if 
there is &lt;/DIV&gt;
&lt;DIV&gt;too many threads and not a sufficient number of rwlocks in the Dmitry 
distributed&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;rwlock to be able to lower the contention. &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Amine Moulay Ramdane.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 26 Aug 2012 00:48:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/About-concurrent-hashtable-and-Dmitry-distributed-rwlock/m-p/993951#M6327</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2012-08-26T00:48:18Z</dc:date>
    </item>
  </channel>
</rss>

