Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #3324 > unrolled thread

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

Started byaminer68@gmail.com
First post2016-05-10 17:05 -0700
Last post2016-05-16 15:59 +0200
Articles 3 — 3 participants

Back to article view | Back to comp.programming.threads


Contents

  Finally my great updated C++ synchronization objects library is here... aminer68@gmail.com - 2016-05-10 17:05 -0700
    Re: Finally my great updated C++ synchronization objects library is here... Bonita Montero <Bonita.Montero@gmail.com> - 2016-05-16 14:55 +0200
    Re: Finally my great updated C++ synchronization objects library is here... Gerald Breuer <Gerald.Breuer@gmail.com> - 2016-05-16 15:59 +0200

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

Fromaminer68@gmail.com
Date2016-05-10 17:05 -0700
SubjectFinally my great updated C++ synchronization objects library is here...
Message-ID<d548ded9-778e-4611-9676-f2de82d99469@googlegroups.com>
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.com/forum/#!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-writer-mutex

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-objects-library



Thank you,
Amine Moulay Ramdane.


[toc] | [next] | [standalone]


#3348

FromBonita Montero <Bonita.Montero@gmail.com>
Date2016-05-16 14:55 +0200
Message-ID<nhcfvc$6o1$1@news.albasani.net>
In reply to#3324
Am 11.05.2016 um 02:05 schrieb aminer68@gmail.com:

> https://groups.google.com/forum/#!topic/lock-free/Hv3GUlccYTc

Totally inefficient!

-- 
http://facebook.com/bonita.montero/

---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus

[toc] | [prev] | [next] | [standalone]


#3349

FromGerald Breuer <Gerald.Breuer@gmail.com>
Date2016-05-16 15:59 +0200
Message-ID<nhcjnh$e6n$1@news.albasani.net>
In reply to#3324
Don't trust this buggy code.

---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming.threads


csiph-web