In addition to the previous answers, it is worth noting that a and b will be evaluated only in the weak head normal form (WHNF) (i.e., using the outermost reduction or constructor), so it would be useful to force with deepseq .
In terms of the operational semantics of par , a spark is created that is a pointer to thunk (invaluable calculation) and added to the spark pool. It is very cheap, and it is possible to have millions of sparks. Creating a theme is advisory; the runtime system may decide not to turn a into a stream and prune superfluos parallelism, ignoring the spark or adding the parent spark in the parent.
The displayed image may indicate a problem with your code, where the thread running on CPU2 has significantly less load disbalance.
source share