Parallel Programming with Transactions
Dan
murpsoft at hotmail.com
Wed Feb 27 22:32:02 PST 2008
serg kovrov Wrote:
> A blog entry on Research at Intel - Parallel Programming with Transactions:
> http://blogs.intel.com/research/2008/02/parallel_programming_with_tran.php
>
> I wonder if one day D's `synchronized` could be used the same way as
> proposed in article `atomic` statement?
>
> I understand that this is rather runtime library feature but still, it
> would be nice to know that today's language constructs semantically
> ready to the point then compiler/lib could automagically parallelize
> code written today.
>
> -- serg
The problem with parallel programming in it's current incarnation is that most of the algorithms were designed by Java Programmers, which is only a slight improvement on HTML Web Designers - the point being that they've never read a hex number in their life let alone seen machine code.
I like locking only for allocate, free, and share; and then having each thread handle it's own stuff otherwise.
Done properly, spin locks will only loop if another thread has successfully passed the gate first - removing deadlock and naturally resolving most livelock conditions.
They're also markedly easier to implement with the device only weighing about 40-100 bytes.
Regards,
Dan
More information about the Digitalmars-d
mailing list