views:

257

answers:

3

Let's say you have a single (1) Intel/AMD x86-64 bit 2 GHz 8 core processor.

Does each of the 8 cores all run at the full 2 GHz or, does each core run at some fraction of the full 2 GHz clock (e.g. 250 MHz)?

+3  A: 

The first one, the clock is an input generated by a quartz oscillator that is "injected" into the CPU and it's used to synchronize the whole bunch of transistors.. while there can be different clocks used for different parts of the hardware the one that drives the CPU (and every inner core it's the same).

A side node: some advanced CPU are able to step down some cores because they are idle at the moment. This is usually achieved by scaling the base clock speed by a factor, but it's just to save power.

Mind that having more CPUs shouldn't increase context switches: a context switch is done whenever the quantum of a process ends, or pre-emption occurs, so with an higher number of cores you will have more "consumers" able to execute the processes, with a lower need to exchange them.

Jack
"the clock is shared between the whole chip" actually sounds like they should get a slice each :-) Perhaps "the 2GHz signal is fed into each core" would be better, but +1 anyway since you're right. I love the #2 concept - what would be the actual point of multi-core if each new one slowed down the others?
paxdiablo
But if it also SHARES the clock, that implies that whenever you increase the core count, you are also increasing the context switch latency ... which is worse as well. No?
GregH
The clock is not the bus, neither it's something that is "used" or "consumed" by the cores, it's an electrical signal used for synchronization all over the blocks inside the CPU.
Jack
I would like to have explainations for downvotes, not just trolling.
Jack
@Jack, who downvoted?
GregH
Someone downvoted. With my superpower ability to see both up- and down-votes, I can see it as +4/-1. As to why, I'm afraid my superpowers don't extend that far :-)
paxdiablo
+2  A: 

At full power, they should all run at 2GHz, I'd imagine. However, this doesn't effectively create a 16GHz processor exactly, as a single-thread single-process program running at 100% CPU would only be able to use one. Nevertheless, 8 2GHz cores can be better than one 16GHz cores when the workload is divided well, as each core gets its own cache, etc.. From a more practical perspective, having 8 2GHz cores means if one program runs at 100%, it won't slow your system to a crawl (unless it uses all 8 cores).

Note that modern hardware (with proper OS support) will, upon low workload, typically reduce clock speed and shut down cores in order to save power. The latter might not be so true today, but it will be in the future.

Joey Adams
So, if you have essentially then 8 2 GHz processors but they SHARE the same clock, wouldn't then when you increase the core count, you also increase the context switch latency?
GregH
Not sure I understand the question. One of the benefits of having multiple cores/processors is that fewer context switches are needed (or they're spread out more). Do keep in mind that I'm by no means an expert on the subject.
Joey Adams
@GregH, not sure about context switching, but yes, I/O between cores becomes a bottleneck as you increase the number of cores, which is why it's been so hard going beyond the 16 core count.
Michael Aaron Safyan
+1  A: 

Under full load (that is, when you have programs running taking up all available processor time on all cores), all cores will run at the rated speed (eg, an 8-core 2 GHz processor runs all 8 cores at 2 GHz).

Now, it is possible for the cores to be running at different speeds, depending on the actual load:

  1. Power saving technology can individually power off idle cores to save energy if load is low (as may often be the case on 8-core machines)
  2. Power saving technology can also "underclock" the entire processor to save energy.
  3. Intel's TurboBoost and AMD's upcoming Turbo CORE both allow one of the cores to dynamically overclock itself in the very common case where a single thread or process pegs the CPU.

So, in general, the processor will be at the full speed, but it is possible for the speed to fluctuate dynamically.

Daniel G
Er... could I ask why this was downvoted?
Daniel G