News for hackers. Stuff that matters.
Re:A 1000-processor chip powered by an AA battery (2016) by Someone on Monday February 15, 2021 @09:13AM (#26142899)
I don’t think you can do that well without some global state and code to handle it (aka ‘a runtime’).

It’s not like separate parts of a program can each optimize for the number of threads and their memory for their goals. Optimization/tuning has to happen globally because the resources used (threads, memory) are shared between those parts.

I think most solutions have some global state that magically decides how many threads to run in parallel (more for I/O bound code), how many to assign to each part (which don’t even have to be perfectly separate. Part P might parallellisme a loop where each iteration calls into part Q, which also runs a parallel loop. If each of these decides to run one thread per CPU for N threads in total, the result still c/would be that N² threads run in parallel, likely with suboptimal results)

There are no comments on this comment yet.