Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #2749
| From | Ramine <ramine@1.1> |
|---|---|
| Newsgroups | comp.programming.threads |
| Subject | Scalable distributed sequential lock version 1.11 |
| Date | 2014-12-07 10:46 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <m61sns$nre$2@dont-email.me> (permalink) |
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.
Back to comp.programming.threads | Previous | Next | Find similar | Unroll thread
Scalable distributed sequential lock version 1.11 Ramine <ramine@1.1> - 2014-12-07 10:46 -0800
csiph-web