<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>http://groups.google.com/group/comp.programming.threads</id>
  <title type="text">comp.programming.threads Google Group</title>
  <subtitle type="text">
  All issues about multithreaded programming.
  </subtitle>
  <link href="/group/comp.programming.threads/feed/atom_v1_0_msgs.xml" rel="self" title="comp.programming.threads feed"/>
  <updated>2010-01-06T21:29:49Z</updated>
  <generator uri="http://groups.google.com" version="1.99">Google Groups</generator>
  <entry>
  <author>
  <name>Toby Douglass</name>
  <email>a...@b.com</email>
  </author>
  <updated>2010-01-06T21:29:49Z</updated>
  <id>http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/2fd6675e13be15a6?show_docid=2fd6675e13be15a6</id>
  <link href="http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/2fd6675e13be15a6?show_docid=2fd6675e13be15a6"/>
  <title type="text">Re: lock-free singly linked list design</title>
  <summary type="html" xml:space="preserve">
  No - but it&#39;s possible; the list elements could each contain an ABA &lt;br&gt; counter. That would be nice - then there&#39;s no 2^11 minimum element &lt;br&gt; count requirement. &lt;br&gt; The worse case, as far as I can think of, is a freelist, with a single &lt;br&gt; element being repeatedly popped and pushed. That way you have the same
  </summary>
  </entry>
  <entry>
  <author>
  <name>Toby Douglass</name>
  <email>a...@b.com</email>
  </author>
  <updated>2010-01-06T21:13:41Z</updated>
  <id>http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/ba5f793cec1cc254?show_docid=ba5f793cec1cc254</id>
  <link href="http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/ba5f793cec1cc254?show_docid=ba5f793cec1cc254"/>
  <title type="text">Re: lock-free singly linked list design</title>
  <summary type="html" xml:space="preserve">
  element. &lt;br&gt; I&#39;m implementing ATM - if it works (big if) it&#39;ll be in the next liblfds &lt;br&gt; release.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Toby Douglass</name>
  <email>a...@b.com</email>
  </author>
  <updated>2010-01-06T21:11:41Z</updated>
  <id>http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/22d348217ea8a3bd?show_docid=22d348217ea8a3bd</id>
  <link href="http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/22d348217ea8a3bd?show_docid=22d348217ea8a3bd"/>
  <title type="text">Re: lock-free singly linked list design</title>
  <summary type="html" xml:space="preserve">
  But &lt;br&gt; It&#39;s okay - the queue isn&#39;t using indexes. It&#39;s running off a freelist &lt;br&gt; and that freelist is using normal DCAS pointer/counter pairs - with full &lt;br&gt; local pointer length bit widths. The freelist/queue here convert the &lt;br&gt; pointers into indexes for external users. &lt;br&gt; Well, you have a cursor, which points to an element - which is to say,
  </summary>
  </entry>
  <entry>
  <author>
  <name>Chris M. Thomasson</name>
  <email>n...@spam.invalid</email>
  </author>
  <updated>2010-01-06T21:02:54Z</updated>
  <id>http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/0158c31d2e87aaa3?show_docid=0158c31d2e87aaa3</id>
  <link href="http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/0158c31d2e87aaa3?show_docid=0158c31d2e87aaa3"/>
  <title type="text">Re: lock-free singly linked list design</title>
  <summary type="html" xml:space="preserve">
  [...] &lt;br&gt; Are you using the per-element ABA counter in the actual stack anchor? &lt;br&gt; Something like this: &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://groups.google.com/group/comp.programming.threads/msg/3796240ba6eeaa1c&quot;&gt;[link]&lt;/a&gt; &lt;br&gt; This definitely reduces the chances of ABA problem. Also, keep in mind that &lt;br&gt; you do not need to increment the ABA counter in push, and you don&#39;t even
  </summary>
  </entry>
  <entry>
  <author>
  <name>Toby Douglass</name>
  <email>a...@b.com</email>
  </author>
  <updated>2010-01-06T20:52:26Z</updated>
  <id>http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/332597ccfdad2c64?show_docid=332597ccfdad2c64</id>
  <link href="http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/332597ccfdad2c64?show_docid=332597ccfdad2c64"/>
  <title type="text">Re: lock-free singly linked list design</title>
  <summary type="html" xml:space="preserve">
  *in &lt;br&gt; Yup! &lt;br&gt; Correct. *Exactly*. &lt;br&gt; &lt;p&gt;It wasn&#39;t my aim to target that machine type particularly; what happened &lt;br&gt; was that I was exploring the line of thought &#39;well, how can you know &lt;br&gt; that the element is still valid&#39; and I just went were it took me - and &lt;br&gt; where it&#39;s taken me, right now, this time, is a design which requires 64
  </summary>
  </entry>
  <entry>
  <author>
  <name>Chris M. Thomasson</name>
  <email>n...@spam.invalid</email>
  </author>
  <updated>2010-01-06T20:03:50Z</updated>
  <id>http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/241b30c66dcd6ae2?show_docid=241b30c66dcd6ae2</id>
  <link href="http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/241b30c66dcd6ae2?show_docid=241b30c66dcd6ae2"/>
  <title type="text">Re: lock-free singly linked list design</title>
  <summary type="html" xml:space="preserve">
  [...] &lt;br&gt; I guess it would not be wise to store a pointer to an object in an element. &lt;br&gt; I think I would need to see a legitimate usage example in order to clear my &lt;br&gt; thoughts Toby.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Chris M. Thomasson</name>
  <email>n...@spam.invalid</email>
  </author>
  <updated>2010-01-06T20:01:16Z</updated>
  <id>http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/2088bd92bb742fdb?show_docid=2088bd92bb742fdb</id>
  <link href="http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/2088bd92bb742fdb?show_docid=2088bd92bb742fdb"/>
  <title type="text">Re: lock-free singly linked list design</title>
  <summary type="html" xml:space="preserve">
  [...] &lt;br&gt; What about the ABA counters in the queue itself? Why would a 21-bit counter &lt;br&gt; be too small for a stack, and be okay for a queue? &lt;br&gt; How would the user process the read data? Within the DWCAS loop, or after &lt;br&gt; the DWCAS loop succeeds? In either case, the object can be removed and &lt;br&gt; reused. AFAICT, this design does not prevent a user from operating on
  </summary>
  </entry>
  <entry>
  <author>
  <name>Chris M. Thomasson</name>
  <email>n...@spam.invalid</email>
  </author>
  <updated>2010-01-06T19:44:27Z</updated>
  <id>http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/5916ec0a97f914bc?show_docid=5916ec0a97f914bc</id>
  <link href="http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/5916ec0a97f914bc?show_docid=5916ec0a97f914bc"/>
  <title type="text">Re: lock-free singly linked list design</title>
  <summary type="html" xml:space="preserve">
  Ahh. I missed the fact that the user data is embedded within the &lt;br&gt; double-word! &lt;br&gt; You mean it allows one to access elements in a stack and atomically verifies &lt;br&gt; that they are still indeed in the stack and NOT in the freelist at the time &lt;br&gt; of verification right? &lt;br&gt; Humm, I am not exactly sure if this is very practical or not. Was this
  </summary>
  </entry>
  <entry>
  <author>
  <name>Toby Douglass</name>
  <email>a...@b.com</email>
  </author>
  <updated>2010-01-06T07:54:00Z</updated>
  <id>http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/0c8ded8c73916388?show_docid=0c8ded8c73916388</id>
  <link href="http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/0c8ded8c73916388?show_docid=0c8ded8c73916388"/>
  <title type="text">Re: lock-free singly linked list design</title>
  <summary type="html" xml:space="preserve">
  the &lt;br&gt; When a thread has to verify an element is valid, it will be doing so &lt;br&gt; because there is data is wishes to obtain from that element; and that &lt;br&gt; data is either the pointer to next, the ABA counter of next, the user &lt;br&gt; data in the element, or finally, the ABA counter of the element (with a &lt;br&gt; view to bumping it, as the first stage of a delete).
  </summary>
  </entry>
  <entry>
  <author>
  <name>Chris M. Thomasson</name>
  <email>n...@spam.invalid</email>
  </author>
  <updated>2010-01-05T23:14:15Z</updated>
  <id>http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/ec267cfd0f7db793?show_docid=ec267cfd0f7db793</id>
  <link href="http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/ec267cfd0f7db793?show_docid=ec267cfd0f7db793"/>
  <title type="text">Re: lock-free singly linked list design</title>
  <summary type="html" xml:space="preserve">
  How would you handle issue in which Thread A verifies that an element E is &lt;br&gt; valid, then right before it tries to dereference the pointer, Thread B pops &lt;br&gt; E from the stack, bumps the aba counter and inserts it into a freelist. Now, &lt;br&gt; Thread A dereferences E and operates on state of a node that is in the
  </summary>
  </entry>
  <entry>
  <author>
  <name>Toby Douglass</name>
  <email>a...@b.com</email>
  </author>
  <updated>2010-01-05T21:19:27Z</updated>
  <id>http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/a4e22b6e2fb685c7?show_docid=a4e22b6e2fb685c7</id>
  <link href="http://groups.google.com/group/comp.programming.threads/browse_thread/thread/1e453a556775b28d/a4e22b6e2fb685c7?show_docid=a4e22b6e2fb685c7"/>
  <title type="text">lock-free singly linked list design</title>
  <summary type="html" xml:space="preserve">
  I&#39;ve been thinking about lock-free singly linked lists. &lt;br&gt; I&#39;ve had a thought or two. I will fall off my chair if any of this is &lt;br&gt; original. What I would like however is to see what you guys think, &lt;br&gt; since it&#39;s nicer to find mistakes *before* you&#39;ve put in hours and hours &lt;br&gt; of implementation work. &lt;br&gt; Having looked somewhat at the literature, there seem to be a number of
  </summary>
  </entry>
  <entry>
  <author>
  <name>BEAN</name>
  <email>m.50ah...@gmail.com</email>
  </author>
  <updated>2010-01-05T19:51:51Z</updated>
  <id>http://groups.google.com/group/comp.programming.threads/browse_thread/thread/b1a992398e18d96c/6a578c3217dc18c3?show_docid=6a578c3217dc18c3</id>
  <link href="http://groups.google.com/group/comp.programming.threads/browse_thread/thread/b1a992398e18d96c/6a578c3217dc18c3?show_docid=6a578c3217dc18c3"/>
  <title type="text">Internet : Learn How To Use It .</title>
  <summary type="html" xml:space="preserve">
  Internet : Learn How To Use It . &lt;br&gt; Features : &lt;br&gt; E-Mail . &lt;br&gt; Chatting . &lt;br&gt; Upload , Download and Share . &lt;br&gt; Blog or website creation . &lt;br&gt; Earning schemes . &lt;br&gt; Check all of these in one place at &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;http://internetnumber.blogspot.com/&quot;&gt;[link]&lt;/a&gt;
  </summary>
  </entry>
  <entry>
  <author>
  <name>Alexander Terekhov</name>
  <email>terek...@web.de</email>
  </author>
  <updated>2010-01-04T15:21:40Z</updated>
  <id>http://groups.google.com/group/comp.programming.threads/browse_thread/thread/d3ac06c1cdcdafec/2b986efc0a56e612?show_docid=2b986efc0a56e612</id>
  <link href="http://groups.google.com/group/comp.programming.threads/browse_thread/thread/d3ac06c1cdcdafec/2b986efc0a56e612?show_docid=2b986efc0a56e612"/>
  <title type="text">Re: Avoiding atomic decrement in final ref counting release</title>
  <summary type="html" xml:space="preserve">
  It depends on performance test case of course. &lt;br&gt; No way unless x86/x64 already introduced CHEAPLOCK prefix instruction or &lt;br&gt; something like that. ;-) &lt;br&gt; regards, &lt;br&gt; alexander.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Rani Sharoni</name>
  <email>ranisharon...@gmail.com</email>
  </author>
  <updated>2010-01-04T14:57:33Z</updated>
  <id>http://groups.google.com/group/comp.programming.threads/browse_thread/thread/d3ac06c1cdcdafec/b452b4c6a457ce43?show_docid=b452b4c6a457ce43</id>
  <link href="http://groups.google.com/group/comp.programming.threads/browse_thread/thread/d3ac06c1cdcdafec/b452b4c6a457ce43?show_docid=b452b4c6a457ce43"/>
  <title type="text">Re: Avoiding atomic decrement in final ref counting release</title>
  <summary type="html" xml:space="preserve">
  Much better? what is the perf diff compared with full barrier? &lt;br&gt; Thanks. &lt;br&gt; Is this the same as InterlockedIncreament on x86/x64 (running windows) &lt;br&gt; as the memory model is conservative and assure visibility regardless &lt;br&gt; of interlocked-ops? If not, is there a way cheaper than interlocked-op &lt;br&gt; to express your AddRef on x86/x64?
  </summary>
  </entry>
  <entry>
  <author>
  <name>Alexander Terekhov</name>
  <email>terek...@web.de</email>
  </author>
  <updated>2010-01-04T13:22:27Z</updated>
  <id>http://groups.google.com/group/comp.programming.threads/browse_thread/thread/d3ac06c1cdcdafec/6d1d86b8e3a18b1a?show_docid=6d1d86b8e3a18b1a</id>
  <link href="http://groups.google.com/group/comp.programming.threads/browse_thread/thread/d3ac06c1cdcdafec/6d1d86b8e3a18b1a?show_docid=6d1d86b8e3a18b1a"/>
  <title type="text">Re: Avoiding atomic decrement in final ref counting release</title>
  <summary type="html" xml:space="preserve">
  [...] &lt;br&gt; Yep but it is unnecessary heavy. InterlockedDecrementIfGreaterT hanOne() &lt;br&gt; with release on success and acquire on failure would do it much better. &lt;br&gt; Yup. &lt;br&gt; void AddRef() { &lt;br&gt; atomic_fetch_add_explicit(&amp;amp;m_r ef, 1, memory_order_relaxed); &lt;br&gt; regards, &lt;br&gt; alexander.
  </summary>
  </entry>
</feed>
