Number of cores


Martin McBride, 2017-01-20
Tags none
Categories none

The obvious way to make a processor faster is to increase its clock speed. However, increasing the clock speed beyond a few GHz creates challenges:

  • Faster processor generates more heat, so a more expensive cooling system would be required.
  • The main memory of the computer is nowhere near as fast as the CPU, so it eventually reaches the point where a faster CPU would just spend more time waiting for the memory to respond, and would not really do the job any quicker.
  • Electrical signals travel at a finite speed. A 5GHz clock has a cycle time of 0.2 nanoseconds - even light can only travel a few cm in that time.

Dual core

The core of the processor is the ALU, the registers, and possibly some cache memory. The core is the part that executes instructions. In a dual core processor, the main processing part of the chip is duplicated. The processor can then run two programs at the same time.

The advantage of dual core

A single core processor can have several programs running at the same time - for example, you might have a browser and text editor open at the same time, while in the background your virus scanner checks for problems, and your email program checks for new messages. The processor shares its time between these different tasks, switching many times per second, so it appears to be running all the programs simultaneously:

timeline

If fact your computer will probably be running dozens of different tasks. But at any given moment, most of those tasks will have very little to do. The text editor will be waiting for you to press the next key, the email program will for new emails once every 10 minute. The processor will spend a lot of its time idle, which means that when you do press a key, it will respond almost immediately.

Now suppose one particular process is very intensive - for example, if you are using some animation software to create a video. This program will be grabbing as much processing time as it can get. The processor will never be idle:

timeline

The other tasks will still run, but they may be sluggish or unresponsive.

If we have two cores, it means that one core can be used for the intensive task, and the other core can run the remaining tasks normally:

timeline

Of course, if one task makes a lot of accesses to the disk or network, it can still slow the other tasks down.

More cores

Processors often have 4 or more cores.

In the example above, having more than 2 cores would not necessarily help. You might think that the animation task would use 3 cores (so it would run 3 times as fast), and the other tasks would use the remaining core.

In fact, most tasks will only run on a single core, unless the software has been specially written to take advantage of extra cores (this is called multi-threaded programming).

More than 2 cores will normally be helpful in these cases:

  • You are running a processor intensive task which is multi-threaded (as described above).
  • You are running several different processor intensive tasks, which can each use a different core.
  • You have a very large number of small programs, and background tasks, running.

Copyright (c) Axlesoft Ltd 2020