Page 1 of 1
Pentium 4's
Posted: Mon Sep 03, 2007 11:54 pm
by evildragon
I have a Pentium 4, and in task manager, it's showing up as a dual core processor (i see two CPU windows). All programs I run show it as a dual processor system.
BUT, when I write a program to address the second CPU, it's just not there..
I have a dual Pentium III server, and tested my code there, and it works just fine.
What's going on? the Pentium 4 is 3.0GHz..
Posted: Tue Sep 04, 2007 3:41 am
by Mask of Destiny
Many P4s have a feature called hyperthreading. Basically, the processor has hardware to keep track of the execution state of 2 threads at once, but only has one set of execution hardware. It basically reduces the cost of a context switch between two threads if those threads are both running on the CPU.
Posted: Tue Sep 04, 2007 5:08 am
by evildragon
Mask of Destiny wrote:Many P4s have a feature called hyperthreading. Basically, the processor has hardware to keep track of the execution state of 2 threads at once, but only has one set of execution hardware. It basically reduces the cost of a context switch between two threads if those threads are both running on the CPU.
so is it then impossible to force the CPU to spend more time on one code without taking resources way from the whole CPU?
Posted: Tue Sep 04, 2007 10:45 pm
by Chilly Willy
Mask of Destiny wrote:Many P4s have a feature called hyperthreading. Basically, the processor has hardware to keep track of the execution state of 2 threads at once, but only has one set of execution hardware. It basically reduces the cost of a context switch between two threads if those threads are both running on the CPU.
Actually, the reason Intel did hyper-threading is because the P4 "Netburst" architecture had EXTREMELY long pipelines. A stall in the pipe was horribly expensive in terms of latency, so Intel put those stalls to good use by allowing another logical core to use the execution units during a stall of the first logical core until IT stalled as well.
The idea was since a stalled core wasn't doing anything, let another logical core do something. This results in about 15-30% better usage of the Netburst unit execution cycles than one core alone, on average.
Anyway, the logical cores don't include the MMU, so both core have to be executing code using identical MMU tables. Hence, threads of the same process, not different processes. This also holds off one core while the other handles interrupts and other code that executes in a different memory space.
Posted: Fri Sep 07, 2007 1:40 am
by evildragon
installed OS X on this system today (yea, the hacked x86 version), and it seems to be true what MoD said..
OS X reports 1 core, and 1 CPU, but Activity Monitor shows two CPU graphs..