Will my program get more processor time if it has more threads

If the kernel currently schedules 60 threads, they relate to three processes:

A: 10 threads

B: 20 ​​threads

C: 30 threads

And they all do the calculations (without an IO disk)

Will C receive more material than B and B receive more material than A?

It seems to me not very fair. If I'm an irresponsible programmer, I can just create more threads to eat more CPU resources.

How this relates to the golan: In go, as a rule, the go scheduler has a thread pool of # CPU-core threads. Why does it make sense if a process with more threads gets more things?

+4
1

. , , .

, . - , ?

golang: go, go #- . , ?

. goroutine . , -, (-spin-lock) . , , , , .
, IO - IO. - -, " IO".

, , . , parallelism , . . . , , - .

0

Source: https://habr.com/ru/post/1666791/


All Articles