Tuesday, July 26, 2016

Digest for comp.programming.threads@googlegroups.com - 8 updates in 4 topics

Ramine <ramine@1.1>: Jul 25 02:25PM -0400

Hello,
 
I have just updated the Google page of my C++ synchronization objects
library and also my Google page of my Scalable RWLocks, here they are: t
 
https://sites.google.com/site/aminer68/c-synchronization-objects-library
 
and here:
 
https://sites.google.com/site/aminer68/scalable-rwlock
 
 
I have just explained on my those Google pages my new algorithm of my
Asym_RWLockX and LW_Asym_RWLockX.
 
 
 
Thank you,
Amine Moulay Ramdane.
bleachbot <bleachbot@httrack.com>: Jul 25 07:05PM +0200

bleachbot <bleachbot@httrack.com>: Jul 25 07:48PM +0200

bleachbot <bleachbot@httrack.com>: Jul 25 07:55PM +0200

bleachbot <bleachbot@httrack.com>: Jul 25 08:23PM +0200

Ramine <ramine@1.1>: Jul 25 01:51PM -0400

Hello...
 
Here is my new invention that is my new algorithm:
 
I have invented a new algorithm of my scalable Asymmetric Distributed
Reader-Writer Mutex, and this one is costless on the reader side,
this one doesn't use any atomic operations and/or StoreLoad style memory
barriers on the reader side, my new algorithm have
added a technic that looks like Seqlock, but this technic doesn't
loop as Seqlock. Here is my algorithm:
 
On the reader side we have this:
 
--
procedure TRWLOCK.RLock(var myid:integer);
 
var myid1:integer;
id:long;
begin
 
 
myid1:=0;
id:=FCount5^.fcount5;
if (id mod 2)=0
then FCount1^[myid1].fcount1:=1
else FCount1^[myid1].fcount1:=2;
if ((FCount3^.fcount3=0) and (id=FCount5^.fcount5) and
(FCount1^[myid1].fcount1=1))
then
else
begin
LockedExchangeAdd(nbr^.nbr,1);
if FCount1^[myid1].fcount1=2
then LockedExchangeAdd(FCount1^[myid1].fcount1,-2)
else if FCount1^[myid1].fcount1=1
then LockedExchangeAdd(FCount1^[myid1].fcount1,-1);
event2.wait;
LockedExchangeAdd(FCount1^[myid1].fcount1,1);
LockedExchangeAdd(nbr^.nbr,-1);
end;
end;
--
 
 
The writer side will increment FCount5^.fcount5 like does
a Seqlock, and the reader side will grap a copy of FCount5^.fcount5
and copy it on the id variable, if (id modula 2) is equal to zero
that means the writer side has not modified yet Fcount3^.fcount3,
and the reader side will test again if FCount3^.fcount3 equal 0, and
if id=FCount5^.fcount5 didn't change and if FCount1^[myid1].fcount1 that
we have assigned before didn't change and that means that we are
sure that the writer side will block on FCount1^[myid1].fcount1 equal 1.
 
And notice with me that i am not looping like in Seqlock.
 
And the rest of my algorithm is easy to understand.
 
This technic that looks like Seqlock without looping like Seqlock
will allow us to be sure that although the x86 architecture will reorder
the loads of the inside reader critical section , the loads
inside the reader critical section will not go beyond the load of
FCount5^.fcount5 and this will allow my algorithm to work correctly.
 
My algorithm is FIFO fair on the writer side and FIFO fair on the
Reader side , and of course it is Starvation-free, and it is
suitable for realtime critical systems.
 
I have just updated my C++ synchronization library with
the implementation of my new algorithm..
 
You can download it from:
 
https://sites.google.com/site/aminer68/c-synchronization-objects-library
 
 
You will find the source code of my new algorithm here:
 
https://sites.google.com/site/aminer68/scalable-distributed-reader-writer-mutex
The source
 
 
It is the version 2 that is my own algorithm.
 
 
 
Thank you,
Amine Moulay Ramdane.
Ramine <ramine@1.1>: Jul 25 01:58PM -0400

Hello,
 
My Asym_RWLockX and LW_Asym_RWLockX algorithms work the same.
 
 
 
Thank you,
Amine Moulay Ramdane.
Ramine <ramine@1.1>: Jul 25 01:08PM -0400

Hello,
 
My Threadpool HTML tutorials were updated...
 
Please download the zip files again from the following links:
 
1- An efficient Threadpool engine that scales well
 
https://sites.google.com/site/aminer68/an-efficient-threadpool-engine-that-scales-well
 
2- An efficient Threadpool engine with priorities that scales well
 
https://sites.google.com/site/aminer68/an-efficient-threadpool-engine-with-priorities-that-scales-well
 
3- Threadpool engine version 3.0
 
https://sites.google.com/site/aminer68/threadpool
 
4- Threadpool with priorities version 3.0
 
https://sites.google.com/site/aminer68/threadpool-with-priorities
 
 
 
Thank you,
Amine Moulay Ramdane.
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.programming.threads+unsubscribe@googlegroups.com.

No comments: