Core assignments of a CPU

LinComp

Honorable
Mar 8, 2013
143
0
10,680
Hi, How does a computer use the cores of its CPU? Let us say I have a laptop with 4 cores (quad core processor);

If I open 2 pages of yahoo (one page for yahoo email reading, another page for internet banking), 1 page of Microsoft Word, and same time an antivirus running in the background, all these 4 activities happening at the same time then will the computer assign 1 separate core for each of these 4 above mentioned activities or same single core will take care of all these 4 activities, or may be 2 cores will take care of all the above mentioned 4 activities?.

Once again the 4 different activities are as follows;

1) 1 page of Yahoo for yahoo email

2) 1 page of yahoo or other browser window for internet banking

3) 1 page of microsoft word

4) An antivirus scanning the computer on the back ground

The question is if the above 4 activities are going on simultaneously then one single core will handle all these 4 activities, or 1 core each for each of the above activities, or some other kind of core assignments? Thanks!
 
Solution
Applications instantiate threads. Those threads land in the OS scheduler. The OS scheduler runs the threads on whichever cores are available in whatever order it deems fit unless applications give it specific instructions on scheduling sequences or use IPC mechanisms to force a specific order.

InvalidError

Titan
Moderator
Applications instantiate threads. Those threads land in the OS scheduler. The OS scheduler runs the threads on whichever cores are available in whatever order it deems fit unless applications give it specific instructions on scheduling sequences or use IPC mechanisms to force a specific order.
 
Solution

LinComp

Honorable
Mar 8, 2013
143
0
10,680
Thank you! Is it possible to tell me how about the 4 applications I exampled above, the computer OS scheduler will ask a single core to handle all these activities, or will it assign different cores for different above mentioned activities?
 

InvalidError

Titan
Moderator
The exact distribution depends on applications, CPU-specific drivers, power management, etc.

But most of the time, they just end up scheduled to whatever CPU is available in no particular order. Part of the reason for randomizing scheduling is to spread heat more or less evenly across all cores.