Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mutli-core Processors: Does each "core" run at the full clock speed or some fraction of the full clock frequency?

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)?

like image 842
GregH Avatar asked Apr 12 '10 03:04

GregH


2 Answers

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.

like image 144
Daniel G Avatar answered Nov 16 '22 04:11

Daniel G


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.

like image 24
Jack Avatar answered Nov 16 '22 03:11

Jack