Ratio of threads to number of processors

Asked

Viewed 225 times

4

In the image below my task manager there are 3058 Threads. My processor has 4 threads. This means that of these 3058 it will run 4 in 4 threads?

inserir a descrição da imagem aqui

My processor has 4 cores and 4 threads, that means for each core it has 4 threads?

1 answer

4


It’s not that simple. It means that your computer has the ability to run 4 threads (is the number of Logic Processors indicated) at each time in parallel, that is, at the same time of truth.

It does not mean that because there are so many so will always be running 4, for various reasons may have unused processors. The biggest reason for this is thread be stopped and do not need to perform something at the moment, most of those that are showing there are in waiting state then you may not have to run 4 at the same time.

It is common that several of them that are actually running work more or less at the same time. This more or less means that the execution is not parallel, but simultaneous. They are gradually executing, interspersed with others. And of course some will be simultaneous and parallel, but always at the limit of 4 effectively parallel. See the differences.

See more in There is difference between Program, Thread and Process? and It’s always guaranteed that a multi-threaded application runs faster than using a single thread?.

Each core can run a single thread at the same time. Some processors allow a kernel to be divided into two processing lines and then run two threads at the same time, but this is not so at the same time, there is a division within the hardware, but it is not exposed to the software, so it works as if it were at the same time. These computers would show 8 logic processors instead of 4, but still 4 cores, so you could run 8 threads at "the same time".

Browser other questions tagged

You are not signed in. Login or sign up in order to post.