[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.programming

The concurrency area is very interesting

Ramine

11/2/2014 12:01:00 AM


Hello,


The concurrency area is very interesting, i will explain to you more
some concepts so that you the why i have invented my scalable
synchronization algorithms..

For example when a mutating integer variable (a variable that changes)
is used from multiple threads, the content of this variable have to be
transfered from one core to another core, and this generate cache-line
transfer from one core to the other, and this a cache-line transfer is
expensive, so you have to optimize more your algorithms to reduce the
number of variables that generate cache-line transfers cause those
variables will generate more contention and will slow your algorithm,
and if you are spin-waiting waiting for a specific content of a variable
that is mutating you have to minimize efficienly the cache-coherence
traffic, that means you have to do your best to transform your algorithm
so that this spin-waiting on a specific content of a variable will
generate less cache-line transfers, this is what is doing my algorithms,
my algorithms of my scalable sychronization algorithms and my algorithms
of efficient concurrent FIFO queues are efficient in the sense that
they reduce the cache coherence traffic and they use less variables that
generate cache-line transfers.


I will also add something important:

If you look at my very fast concurrent FIFO queue here:

https://sites.google.com/sit.../concurrent-fi...


As you have noticed i am not using a lock around the push()
and another lock around the pop(), and you have to understand
that for example the "setObject(lastHead,tm)" will be executed
in parallel and each thread will write the tm variable
in its write-back cache , that means it will not write immediatly
the content of the variable to the memory , but will write it latter,
so this parallelism will higher the throughput and this is what i have
noticed on my benchmarks , i have got more throughput than the two-lock
algorithm, but when you are using a lock around the push()
and a lock around the pop() you will not get this parallelism
so this will drop the throughput... and that's the same for
the pop() method , the "if fcount1^[lastTail and fMask].flag=1"
can be executed in parallel and the inter-communication between
the cores can be done in parallel so this will higher the throughput...
This is why i have told you that my new algorithm of a very fast
concurrent FIFO queue has more parallelism than the two-lock algorithm ,
and it has a much better throughput, and it will scale better with more
and more cores.


Please take a look at my other projects here:

https://sites.google.com/sit...



Thank you,
Amine Moulay Ramdane.