[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.programming

Finally my great updated C++ synchronization objects library is here...

aminer

5/11/2016 12:03:00 AM

Hello,

Finally my great updated C++ synchronization objects library is here...

I have corrected the bug with my scalable Asymmetric Distributed Reader-Writer mutex , and now i have modified some logic inside it, and now
it uses the windows FlushProcessWriteBuffers() on the writer side of my algorithm that executes a Full memory barrier on the other processors so that the variables that are needed by the writer side of my algorithm are visible. So you have to understand that declaring a variable volatile in C++ is not a sufficient condition to make the variable visible across cores, you need to execute a Full memory barrier, and this is what is doing the windows function FlushProcessWriteBuffers() on the writer side of my algorithm.


Now i need to make my new scalable Asymmetric Distributed Reader-Writer Mutex algorithm more clear, the Dmitry Vyukov scalable Asymmetric rw_mutex here:

https://groups.google.c...!topic/lock-free/Hv3GUlccYTc

This algorithm when it makes "writer_pending = true", it will block
all the readers the time needed for the following loop to execute:

for (int i = 0; i != max_reader_count; ++i)
{
// wait for all readers to complete
while (reader_inside[i])
SwitchToThread();
}


An this is expensive and not efficient, but my new algorithm that
is my scalable Asymmetric Distributed Reader-Writer Mutex algorithm,
doesn't block like that the reader threads, since in my new algorithm even if you enter like this loop above, the reader-side can still execute in parallel when the loop is not yet finished,
and this what makes my scalable Asymmetric Distributed Reader-Writer Mutex algorithm efficient, it has more parallelism than the Dmitry Vyukov scalable Asymmetric rw_mutex.


If you need to take a look at my new algorithm, just download the
source code , just look at version 2 of my algorithm
inside DRWLOCK.pas source code, you can download the source code
from here:

https://sites.google.com/site/aminer68/scalable-distributed-reader-wr...

So hope that you will be happy with my great C++ synchronization objects library !


You can download my new and updated C++ synchronization objects library
from:

https://sites.google.com/site/aminer68/c-synchronization-objec...



Thank you,
Amine Moulay Ramdane.