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..
Pentium 4's
Moderator: BigEvilCorporation
-
- Very interested
- Posts: 326
- Joined: Mon Mar 12, 2007 1:53 am
- Contact:
-
- Very interested
- Posts: 616
- Joined: Thu Nov 30, 2006 6:30 am
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.
-
- Very interested
- Posts: 326
- Joined: Mon Mar 12, 2007 1:53 am
- Contact:
so is it then impossible to force the CPU to spend more time on one code without taking resources way from the whole CPU?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.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
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.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.
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.
-
- Very interested
- Posts: 326
- Joined: Mon Mar 12, 2007 1:53 am
- Contact: