Plinq, Cores and WithDegreeOfParallelism?

Viewed 3814

AS far as I understood , Plinq decides how many thread to open ( each on a thread on different core) by cores count.

__________

  Core 1
  Core 2
  Core 3
  Core 4
___________

So If I Have a Plinq task which finds all the first 1000 prime numbers , Plink will open a new Thread on each Core in order to maximize the efficiency.

So here , each core will be running on 1000/4 numbers , the logic of finding the prime numbers.

However I've read that a blocking operations like IO should be used with WithDegreeOfParallelism so that the cpu won't think that this is an intensive cpu operation , and it allowed to use more threads than cores.

Question :

1) Is it accurate ? Did I understood it correctly ?

2)If I set WithDegreeOfParallelism (7) so it will definitely use all the 4 cores , but what about the other 3 ? ( 7-4) where will they be running ? on which core/s ?

1 Answers
Related