Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #2357 > unrolled thread
| Started by | aminer <aminer@toto.net> |
|---|---|
| First post | 2014-05-18 15:10 -0700 |
| Last post | 2014-05-18 15:16 -0700 |
| Articles | 3 — 1 participant |
Back to article view | Back to comp.programming.threads
About my new algorithm aminer <aminer@toto.net> - 2014-05-18 15:10 -0700
Re: About my new algorithm aminer <aminer@toto.net> - 2014-05-18 15:12 -0700
Re: About my new algorithm aminer <aminer@toto.net> - 2014-05-18 15:16 -0700
| From | aminer <aminer@toto.net> |
|---|---|
| Date | 2014-05-18 15:10 -0700 |
| Subject | About my new algorithm |
| Message-ID | <llb0ia$oaa$1@news.albasani.net> |
Hello, Here is what have changed in my new algorithm of a very fast concurrent FIFO queue: In my previous algorithm the atomic increment of "LockedIncLong(temp)" was located after the getlength() method , so in the worst case scenario, that happen frequently under contention, we have to transfer 4 cache-lines between the cores: the tail variable, the head variable, and another time the head variable, and the flag1 variable, this will make it 4 cache-line transfers and this is expensive... so in my new algorithm i have reduce that to 3 cache-lines transfers in the worst case, that happen frequently under contention, and this is much better , so my new algorithm has scored much better throughput than my previous algorithm, and my new algorithm is 100% starvation-free. Hope you will be happy with this new algorithm. Here is my new algorithm: http://pages.videotron.com/aminer/CQueue2.htm And you can download my very concurrent FIFO queue version 1.2 from: https://sites.google.com/site/aminer68/concurrent-fifo-queue-1 Thank you, Amine Moulay Ramdane.
[toc] | [next] | [standalone]
| From | aminer <aminer@toto.net> |
|---|---|
| Date | 2014-05-18 15:12 -0700 |
| Message-ID | <llb0lp$oaa$4@news.albasani.net> |
| In reply to | #2357 |
Hello, I was speaking about the push() method. Thank you, Amine Moulay Ramdane.
[toc] | [prev] | [next] | [standalone]
| From | aminer <aminer@toto.net> |
|---|---|
| Date | 2014-05-18 15:16 -0700 |
| Message-ID | <llb0tf$p4h$1@news.albasani.net> |
| In reply to | #2357 |
I correct, please read again... Hello, Here is what have changed in my new algorithm of a very fast concurrent FIFO queue: inside the push method of my previous algorithm, the atomic increment of "LockedIncLong(head)" was located after the getlength() method , so in the worst case scenario, that happen frequently under contention, we have to transfer 4 cache-lines between the cores: the tail variable, the head variable, and another time the head variable, and the flag1 variable, this will make it 4 cache-line transfers and this is expensive... so in my new algorithm i have reduced that to 3 cache-line transfers in the worst case, that happen frequently under contention, and this is much better , so my new algorithm has scored much better throughput than my previous algorithm, and my new algorithm is 100% starvation-free. Hope you will be happy with this new algorithm. Here is my new algorithm: http://pages.videotron.com/aminer/CQueue2.htm And you can download my very concurrent FIFO queue version 1.2 from: https://sites.google.com/site/aminer68/concurrent-fifo-queue-1 Thank you, Amine Moulay Ramdane.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.programming.threads
csiph-web