www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D2 CAS, atomic increment

reply Jason House <jason.james.house gmail.com> writes:
I'm currently using part of the Tango D2 branch to get basic lock free methods.
I know there's license issues with just copying Tango into Phobos, so does
anyone have (or be able to write) these basic building blocks?

I'm planning on porting the lock-free (and mostly fence free) hash table from
"high-scale-lib". It beats the pants off Java's concurrent hash table and
scales nearly linear to hundreds of cores and thousands of threads. It can also
handle a high write rate. I'll try to get it into Phobos when done.
Apr 15 2009
next sibling parent Oliver Dathe <o.dathe gmx.de> writes:
Jason House wrote:
 I'm currently using part of the Tango D2 branch to get basic lock
 free methods. I know there's license issues with just copying Tango
 into Phobos, so does anyone have (or be able to write) these basic
 building blocks?
When I used Tango for atomic ops I ran into a couple of problems you may be aware of: http://dsource.org/projects/tango/attachment/ticket/1202/atomic.d http://dsource.org/projects/tango/ticket/1222 If it helps you can use my proposal for [1202] http://dsource.org/projects/tango/attachment/ticket/1202/atomic.d under any license you wish. However it is just for most simple atomic arithmetic operations and uses CTFE for assembling appropriate asm code. Recently I've used libatomic_ops from Boehm-GC in a C++ project. http://www.hpl.hp.com/research/linux/atomic_ops/
 I'm planning on porting the lock-free (and mostly fence free) hash
 table from "high-scale-lib". It beats the pants off Java's concurrent
 hash table and scales nearly linear to hundreds of cores and
 thousands of threads. It can also handle a high write rate. I'll try
 to get it into Phobos when done.
Cool
Apr 15 2009
prev sibling next sibling parent reply Don <nospam nospam.com> writes:
Jason House wrote:
 I'm currently using part of the Tango D2 branch to get basic lock free
methods. I know there's license issues with just copying Tango into Phobos, so
does anyone have (or be able to write) these basic building blocks?
There are no license issues with using anything written by Sean (or me).
 
 I'm planning on porting the lock-free (and mostly fence free) hash table from
"high-scale-lib". It beats the pants off Java's concurrent hash table and
scales nearly linear to hundreds of cores and thousands of threads. It can also
handle a high write rate. I'll try to get it into Phobos when done.
Apr 15 2009
parent reply "Denis Koroskin" <2korden gmail.com> writes:
On Wed, 15 Apr 2009 17:23:51 +0400, Don <nospam nospam.com> wrote:

 Jason House wrote:
 I'm currently using part of the Tango D2 branch to get basic lock free  
 methods. I know there's license issues with just copying Tango into  
 Phobos, so does anyone have (or be able to write) these basic building  
 blocks?
There are no license issues with using anything written by Sean (or me).
  I'm planning on porting the lock-free (and mostly fence free) hash  
 table from "high-scale-lib". It beats the pants off Java's concurrent  
 hash table and scales nearly linear to hundreds of cores and thousands  
 of threads. It can also handle a high write rate. I'll try to get it  
 into Phobos when done.
Perhaps, now that there is core.sync module in druntime, those atomics could be added to core.sync and std.atomics got deprecated? BTW, core.sync is not included into DMD bundle and needs to be generated by hand. I believe it is a bug that is there since DMD2.027
Apr 15 2009
next sibling parent Kagamin <spam here.lot> writes:
Denis Koroskin Wrote:

 Perhaps, now that there is core.sync module in druntime, those atomics could
be added to core.sync and std.atomics got deprecated?
Does anyone know current policy of using core package?
Apr 15 2009
prev sibling parent Sean Kelly <sean invisibleduck.org> writes:
Denis Koroskin wrote:
 On Wed, 15 Apr 2009 17:23:51 +0400, Don <nospam nospam.com> wrote:
 
 Jason House wrote:
 I'm currently using part of the Tango D2 branch to get basic lock free  
 methods. I know there's license issues with just copying Tango into  
 Phobos, so does anyone have (or be able to write) these basic building  
 blocks?
There are no license issues with using anything written by Sean (or me).
  I'm planning on porting the lock-free (and mostly fence free) hash  
 table from "high-scale-lib". It beats the pants off Java's concurrent  
 hash table and scales nearly linear to hundreds of cores and thousands  
 of threads. It can also handle a high write rate. I'll try to get it  
 into Phobos when done.
Perhaps, now that there is core.sync module in druntime, those atomics could be added to core.sync and std.atomics got deprecated?
Yup. I've mostly been holding off on this until the multiprogramming strategy is better defined.
 BTW, core.sync is not included into DMD bundle and needs to be generated by
hand. I believe it is a bug that is there since DMD2.027
Fixed for the next release. It was an issue with the script that generates the druntime bundle.
Apr 15 2009
prev sibling parent mw <mingwu gmail.com> writes:
On Wednesday, 15 April 2009 at 12:41:37 UTC, Jason House wrote:

 I'm planning on porting the lock-free (and mostly fence free) 
 hash table from "high-scale-lib". It beats the pants off Java's 
 concurrent hash table and scales nearly linear to hundreds of 
 cores and thousands of threads. It can also handle a high write 
 rate. I'll try to get it into Phobos when done.
Just wondering if this has been done? And where it is? Or does anyone know if there is any lock-free hash table in D? Thanks.
May 23 2022