Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #2193
| From | aminer <aminer@toto.net> |
|---|---|
| Newsgroups | comp.programming.threads, comp.programming |
| Subject | Please read the following.... |
| Date | 2014-04-19 19:47 -0700 |
| Organization | albasani.net |
| Message-ID | <liv1u5$fl1$1@news.albasani.net> (permalink) |
Cross-posted to 2 groups.
Hello, I have discovered a problem today, when you are using a Ticketspinlock or an array based lock, don't use the "pause" asm instruction only when you are spinning waiting for the lock or don't use a proportional backoff using the "pause" asm instruction only when you are spinning waiting for the lock, cause this can lead to a big problem that look like a lock convoy, if you start more threads than cores for example the system will switch between the threads and giving each thread it's quantum time even if the threads don't enter the Enter() method of the lock, and this will lead to a big problem , this can slow by much the threads entering the lock, this will look like a lock convoy and this is not acceptable, so the solution is to use a sleep(0) when you are spinning waiting for the lock inside the Enter() method of the lock, but i have noticed that sleep(0) lowers a lot the throughput... so this is very sad ! so from now on becarefull of this big problem ! Thank you, Amine Moulay Ramdane.
Back to comp.programming.threads | Previous | Next | Find similar | Unroll thread
Please read the following.... aminer <aminer@toto.net> - 2014-04-19 19:47 -0700
csiph-web