Jump to content

Let’s say I have a 8700k, so 12 threads. If I have google open and Firefox open at the same time, will google use one thread and Firefox the other? Or will they both use the same one. It seems like a pretty inefficient system if they use the same one, so if they do, what is the reason/what are the benefits.

 

another example. Playing a game and browsing google chrome, will the game use e.g the first 3 threads and google use the 4th, or will the game use 3 threads and google share the first one with the game.

 

another example. Background processes in windows. Are they all running on one thread so one thread things will become slow? Or e.g when a thread is at maximum capacity does it roll over to the next one.

 

hope this makes sense and is In the right place XD.

 

 

i look forward to your replies,

TT

Link to comment
https://linustechtips.com/topic/952652-do-background-processes-use-different-cores/
Share on other sites

Link to post
Share on other sites

the system automatically balances the application on different cores. some apps use multiple cores and some ca noly use one. either way all of your cores are used in most applications. games on the other hand are often not coded to be able to run on more thatn a few cores. although newer titles are coded to run on multiple cores. the bottem line is that all your cores are used and you do not need to worry about anytihg

Link to post
Share on other sites

In OS scheduling, the OS only cares about threads to run, not processes. And threads are not given preference to which logical processor they're run on unless:

  • The OS is running a specific processor it's aware of. It'll make special considerations based any additional rules.
  • The user set logical processor affinity for the process.

The other point is that each thread gets a time slice to run. The thread runs until its time slice is up or it voluntarily gives up it's time. When that happens, the logical processor is considered free to use. When the OS schedules tasks, it looks at which logical processor can accept a task and runs the task on that. Of course, if the logical processor that's available is not considered preferable to use (based on the two items I listed before), it won't schedule the thread to run until one that is preferable to run is available.

 

EDIT: For power saving, the OS may park logical processors when it thinks there's not enough work to saturate the processor. This means that even if you have say 8 threads ready to run on a processor with 8 logical processors, if they're all easy-peasy tasks that take can only keep the entire CPU busy 1% of the time, the OS will likely schedule those 8 threads to run on fewer logical processors and park the rest.

Link to post
Share on other sites

11 minutes ago, The Torrent said:

Let’s say I have a 8700k, so 12 threads. If I have google open and Firefox open at the same time, will google use one thread and Firefox the other? Or will they both use the same one. It seems like a pretty inefficient system if they use the same one, so if they do, what is the reason/what are the benefits.

 

another example. Playing a game and browsing google chrome, will the game use e.g the first 3 threads and google use the 4th, or will the game use 3 threads and google share the first one with the game.

 

another example. Background processes in windows. Are they all running on one thread so one thread things will become slow? Or e.g when a thread is at maximum capacity does it roll over to the next one.

 

hope this makes sense and is In the right place XD.

 

 

i look forward to your replies,

TT

if you open up task manager go in to performance then CPU and right click on graph and click change graph to then logical processors. you can see it your self

Link to post
Share on other sites

Power management and hyperthreading play a role as well. If load is low enough, Windows will try to run as many threads as possible on  the fewest physical cores (each with 2 hardware threads if you have a processor with SMT), so that more of the cpu can be shut down to save power.

 

This is partially based on bios power settings and your Windows power plan, however.

 

If a background process needs resources (i.e. it's not suspended), and it's parked on a core that's already active, Windows will do a context switch and move it to a different core until it's done.

 

The context switch takes a long time (in processor terms, a few hundred cycles), but it's worth it to be able to keep more of the hardware powered down more of the time.

Link to post
Share on other sites

Thanks guys, makes sense. Main reason for asking was people kept telling me 8700k has too many threads and i’ll never use them but I guess background processes will take them up so there is use to them. Thank you @_Dr_Eye_ for the task manager tip didn’t know that :)

 

TT

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×