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


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

Scalable distributed sequential lock version 1.11

Started byRamine <ramine@1.1>
First post2014-12-07 10:46 -0800
Last post2014-12-07 10:46 -0800
Articles 1 — 1 participant

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


Contents

  Scalable distributed sequential lock version 1.11 Ramine <ramine@1.1> - 2014-12-07 10:46 -0800

#2749 — Scalable distributed sequential lock version 1.11

FromRamine <ramine@1.1>
Date2014-12-07 10:46 -0800
SubjectScalable distributed sequential lock version 1.11
Message-ID<m61sns$nre$2@dont-email.me>
Hello,


I have updated my scalable distributed sequential lock to version 1.11,
i have just corrected a bug, because before my algorithm was doing this
on the writer side:

In the WLock() it was doing this:

If Fcount5^.fcount5=0 then fcount4^.fcount4:=Fcount4^.fcount4+1;

And in the WUnlock() it was doing this:

If Fcount5^.fcount5=0 then fcount4^.fcount4:=Fcount4^.fcount4+1;


This has introduced a bug cause if we are just before
that "FCount6^.fcount6 mod nbrcores" equal to 0 and
the RLock() enters  the reader section without
calling the dw.RLock() and the writer side enters
in a distributed mode and enters the writer section
so they will both succeed to enter and the Runlock()
will return true and this is a bug , to correct this bug
we must delete the "If Fcount5^.fcount5=0" if the 
"count4^.fcount4:=Fcount4^.fcount4+1" like this:

In the WLock() it was doing this:

fcount4^.fcount4:=Fcount4^.fcount4+1;


And in the WUnlock() it was doing this:

fcount4^.fcount4:=Fcount4^.fcount4+1;


Now i think my algorithm is correct.


You can download the updated version 1.01 from:

https://sites.google.com/site/aminer68/scalable-distributed-sequential-lock



Thank you,
Amine Moulay Ramdane.




[toc] | [standalone]


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


csiph-web