Timeline for Does it ever make sense to use more concurrent processes than processor cores?
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 10, 2020 at 10:32 | comment | added | taciteloquence | It's worth mentioning that when a task is parallelized, it is often broken up into convenient chunks, rather than chunks that require the same amount of time. If the threads must occasionally synchronize, then you will always be waiting for the slowest thread to finish. In this case it is better to use more threads than cores so that your cores aren't idle while waiting for the slowest one to finish its work. | |
Sep 3, 2020 at 6:25 | comment | added | Chris Jefferson | Imagine your search must make a "lucky first choice", with 50/50 chance of being right (for example, it must pick an integer and the integer must be even). Once you have picked even you find the answer in 1s, if you pick odd it will take 1,000s to prove wrong The average time of one run is .5 + (.5*.5)*1001 + (.5*.5*.5)*2001 + ..., which is at least > 500. Now imagine we start 10 processes off at the same time on one CPU. It will take them 10 seconds to get to answer if they are "fast", but there is only a 1/1024 chance none of them will be lucky, so our speedup is much more than 10x | |
Sep 2, 2020 at 20:22 | comment | added | HeyJude | This is because you are often looking for something, and you stop as soon as one core finds the answer - a stop after one core finds a result gives you a K speedup, not a >K speedup. otherwise, how do you actually define a K speedup? | |
Sep 2, 2020 at 14:14 | comment | added | Chris Jefferson | It would be useful to explain what properties you are thinking of. "green threads" (languages which support functionality which looks exactly like threads to the user, but are run on the same OS thread, with time-slicing done by the language) would make this easy I suppose. Were you thinking of anything else? | |
Sep 2, 2020 at 13:41 | comment | added | Max Barraclough | this is much harder to implement than just spawning more independant threads This will depend on the programming language. | |
Sep 2, 2020 at 7:24 | comment | added | Peter - Reinstate Monica | That is a very interesting aspect. It's like doing a breadth-first search if you suspcet the desired item is in a shallow section. | |
Sep 1, 2020 at 16:45 | review | First posts | |||
Sep 2, 2020 at 7:26 | |||||
Sep 1, 2020 at 16:41 | history | answered | Chris Jefferson | CC BY-SA 4.0 |