Thread overview
D2 CAS, atomic increment
Apr 15, 2009
Jason House
Apr 15, 2009
Oliver Dathe
Apr 15, 2009
Don
Apr 15, 2009
Denis Koroskin
Apr 15, 2009
Kagamin
Apr 15, 2009
Sean Kelly
May 23, 2022
mw
April 15, 2009
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.
April 15, 2009
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
April 15, 2009
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.
April 15, 2009
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
April 15, 2009
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?
April 15, 2009
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.
May 23, 2022
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.