Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #2736
| From | Ramine <ramine@1.1> |
|---|---|
| Newsgroups | comp.programming.threads |
| Subject | More about my scalable distributed sequential lock |
| Date | 2014-12-05 20:13 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <m5tl66$ftt$2@dont-email.me> (permalink) |
Hello, We must be smart my dear programmers and hardware engineers... As you have noticed i have invented and implemented a powerful synchronization mechanism called Scalable distributed sequential lock, but we have to be smart please, if you look at the Pthread reader-writer lock , it's not using a distributed algorithm, so it's atomicaly incrementing a shared variable and causing cache lines transfers between cores on the reader side, and this act of incrementing atomicaly a shared variable is considered part of the Serial part of the Amdahl's law, so this act of incrementing atomicaly a shared variable on the reader side of the Pthread reader-writer lock will not scale, but in contrast my scalable distributed sequential lock is using an hybrid mechanism that it runs in two modes, in a Seqlock (sequential lock) mode and in a distributed reader-writer lock mode, that means the distributed algorithm that i am using is rendering this atomic increment on the reader side into a scalable parallel part of the Amdahl's law, cause in my distributed algorithm the "lock add" assembler instruction is only executed by a group of threads belonging to the same core , so this part is considered a parallel part , so then it will scale very well, and that's a big improvement over the Pthread reader-writer lock, now if you have noticed Chris M. Thomasson have just answered to me by saying that RCU don't use atomics or memory barriers on the reader side, so this will make it both "faster" and "scalable", but you have to understand that my new algorithm is less faster than RCU but it's scalable on read-mostly scenarios, and you have to understand also that it improves on some characteristics over Seqlock because my new algorithm will not starve and livelock with more writers, so you have to understand that if you want your website to load balance correctly between the users you can not simply use Seqlock, cause Seqlock gives preference to the writers and it can livelock and starve on scenarios with more writers, so this is why my new algorithm comes in hand because it load balance between readers and writers better than Seqlock. Hope you have unerstood what i want to say in this post, so hope you have found my new algorithm called Scalable distributed sequential lock an interesting invention that you have to take into consideration. You can download my scalable distributed sequential lock 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
More about my scalable distributed sequential lock Ramine <ramine@1.1> - 2014-12-05 20:13 -0800
csiph-web