why does a single threaded app use both cpu's in task manager?

her34

Senior member
Dec 4, 2004
581
1
81
i have dual core and when i run a single threaded app like mp3 encoding the cpu chart in task managers show both cores being used, although not identically.

is this correct? shouldn't it be one core being maxed and the other being idle?
 
Mar 19, 2003
18,289
2
71
As I understand it, the Windows task scheduler is free to run a process on whatever CPU it has affinity settings for...meaning context switches back into the threads might occur on different cores each time, even though it uses only one at any given moment. This happens many times per second, thus giving the illusion that both cores are under use at the same time by the same program...

At least, I think that's what's happening :p
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Agreed. That is exactly what's happening. If you want to get all the cycles onto one core you can set the processor affinity in Taskman (right click the process name).
 

her34

Senior member
Dec 4, 2004
581
1
81
do you lose performance from the switching?

does heat dissipation decrease by doing it that way?
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
I don't think it would have much if any impact on heat dissipation in a case where both cores are on the same die. In a dual processor system with seperate chips it would conceivably keep both cores cooler than one would be doing all the work, but I think roughly the same number of calories would be transferred to the air in the case either way.

Lose performance? Not in terms of any realistic comparison. The context switches are taking place anyway, whether you have one chip or two. A system with no context switches would be faster at running a single thread than a system with context switches, but that's DOS ;).
 

TheInternet1980

Golden Member
Jan 9, 2006
1,651
1
76
Originally posted by: Markbnj
I think roughly the same number of calories would be transferred to the air in the case either way

WTF?!?! I have a dual core CPU and leave the side panel off of my case, are these calories I am inhaling why I am fat? ;)

 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Originally posted by: TheInternet1980
Originally posted by: Markbnj
I think roughly the same number of calories would be transferred to the air in the case either way

WTF?!?! I have a dual core CPU and leave the side panel off of my case, are these calories I am inhaling why I am fat? ;)

Watts, ergs, newtons, whatever :). Don't eat em.