use sleeping threads
Moderators: hgm, Rebel, chrisw
-
- Posts: 27790
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: use sleeping threads?
Note that if you let the spinning thread do some long-latency operation that stalls it in the CPU it will hardly consume any resources at all, while the delay to release it from spinning can still be orders of magnitude smaller than when you need OS interference to restart it. You could for instance include a floating divide in the spinning loop. As the divide unit is not pipelined, and a divide takes dozens of clock cycles, the HT would be stalled waiting for the divide unit to become available again. And as none of the working threads would ever need the divide unit, it is basically like the core is unloaded.
-
- Posts: 6401
- Joined: Thu Mar 09, 2006 8:30 pm
- Location: Chicago, Illinois, USA
Re: use sleeping threads
Good suggestion. Better now to match the grammar:Matthias Gemuh wrote:... ormichiguel wrote:...
"threads type" = spinning/sleeping
...
Miguel
"Idle Threads" = spinning/sleeping.
"Idle Threads" = spin/sleep
Gee... after Ray's post I realized the ambiguity of "use sleeping threads" (I was blind!), so yes, it should be changed.
Miguel
-
- Posts: 5557
- Joined: Tue Feb 28, 2012 11:56 pm
Re: use sleeping threads?
The engine uses threads that sleep when they are idle. I don't see much of a problem with "Use Sleeping Threads". Let threads sleep seems at least as confusing.Matthias Gemuh wrote:"Use" is the wrong verb if you want something to sleep.syzygy wrote:"Use Sleeping Threads" refers to what a thread does when it is waiting for work. If set to true, the thread sleeps. If set to false, the thread spins.
... .
"Let Threads Sleep" is better terminology if "true" makes threads sleep.
If there is any problem, it is that users have no idea that it refers to the behaviour of threads when they are idle. If this is to be solved, the option should mention "idle". "Let Idle Thread Sleep" might be OK. But the problem remains that users still won't know what this means... Any non-programmer here that knows what a spinlock is?
-
- Posts: 5106
- Joined: Tue Apr 29, 2008 4:27 pm
Re: use sleeping threads
Many of these suggestions assume that you have some default context and really is quite confusing.
Miguels suggestion here is the best in my opinion because it is explicit. There would be no ambiguity with "Idle Threads" = spin/sleep
Don
Miguels suggestion here is the best in my opinion because it is explicit. There would be no ambiguity with "Idle Threads" = spin/sleep
Don
michiguel wrote:Good suggestion. Better now to match the grammar:Matthias Gemuh wrote:... ormichiguel wrote:...
"threads type" = spinning/sleeping
...
Miguel
"Idle Threads" = spinning/sleeping.
"Idle Threads" = spin/sleep
Gee... after Ray's post I realized the ambiguity of "use sleeping threads" (I was blind!), so yes, it should be changed.
Miguel
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
-
- Posts: 1339
- Joined: Fri Nov 02, 2012 9:43 am
- Location: New Delhi, India
Re: use sleeping threads
Try 'uso que duerme hilos'mcostalba wrote:hmmm I am not sure this is better.zullil wrote:Please see http://talkchess.com/forum/viewtopic.ph ... 56&t=48612mcostalba wrote:
could I ask to please suggest a better name for the option ?
I'd prefer simply "sleeping threads" without 'use', in the same way of 'pondering' or 'infinite analysis'....but I'm curious to see what kind of suggestion comes out from the guy from Oxfordshire here above.
Stick to Programming Marco boy. You could use your native language for your Notes...using Google Translator would be less painful than reading your notes in English
i7 5960X @ 4.1 Ghz, 64 GB G.Skill RipJaws RAM, Twin Asus ROG Strix OC 11 GB Geforce 2080 Tis
-
- Posts: 2016
- Joined: Sun Feb 17, 2008 4:19 pm
Re: use sleeping threads?
here is an example of a spinlock.Any non-programmer here that knows what a spinlock is?
Watch the right front impact wrench, happens quick.
http://www.youtube.com/watch?v=NVJ-gXhscwc
Peterson's algorithm,
kgburcham
-
- Posts: 3546
- Joined: Thu Jun 07, 2012 11:02 pm
Re: use sleeping threads
Yes, this is perfectly clear.Don wrote: Miguels suggestion here is the best in my opinion because it is explicit. There would be no ambiguity with "Idle Threads" = spin/sleep
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: use sleeping threads
I stick to what I want, I feel free to use my time as I wish, even wasting it to answer to a moron, if this is what I like to do.shrapnel wrote: Stick to Programming Marco boy. You could use your native language for your Notes...using Google Translator would be less painful than reading your notes in English
Anyhow you have not suggested a better wording, it seems. As usual, the ones that are more critical are also the ones less titled to do so. But this is not a news for me. I experience it everyday.
Because it seems you like to google for transaltion, translate this: "La madre degli imbecilli è sempre incinta"
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: use sleeping threads
Yes, this is a good suggestion, unfortunately the option is of boolean kind, IOW its value can be only true/falseDon wrote: Miguels suggestion here is the best in my opinion because it is explicit. There would be no ambiguity with "Idle Threads" = spin/sleep
-
- Posts: 5106
- Joined: Tue Apr 29, 2008 4:27 pm
Re: use sleeping threads
How about then using the same basic wording but making it boolean:mcostalba wrote:Yes, this is a good suggestion, unfortunately the option is of boolean kind, IOW its value can be only true/falseDon wrote: Miguels suggestion here is the best in my opinion because it is explicit. There would be no ambiguity with "Idle Threads" = spin/sleep
Idle Threads Sleep = true/false
conversely it could also be:
Idle Threads Spin = true/false
Either one would be perfectly clear I would think.
Don
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.