Saturday, December 22, 2012

Cores and Processors


In simpler terms,

Core: Cores are what handle the arbitrary mathematical and logical workloads. They take high level machine instructions (x86, ARM, MIPS, etc...) and 'decode' them into physical circuit operations. Many other parts of the system, such as GPUs and chipsets operate in a similar manner but are designed with specific purposes in mind which makes them more efficient at these particular tasks. CPU cores are designed with a general purpose, making them jacks of all trades.

Processor / CPU: The combination of one or more 'cores' with supporting hardware and shared resources.

Processor package: The physical casing in which one or more processors or CPUs is contained. The pinout from the package is what allows the processor to interface with the rest of the system. Some processor packages may contain more than one processor die inside of them, or may have the cores and shared resources on separate pieces. The contents of the processor package and how it is organized are up to the manufacturer, hence the distinction between Processor and Processor Package.

For example, the Core 2 Quad processors were actually two individual Core 2 Duo processors in the same package with some very simple supporting hardware to allow them to work together. This stands in contrast to the more modern Sandybridge processors which have all 4 cores and supporting hardware on one chip, a far more efficient design.

The terms 'Processor', 'Core', and 'CPU' are all poorly defined and have undergone many changes in meaning over the year as computer architectures have evolved and changed.

Under modern terminology, 'Processor' and 'CPU' mean more or less exactly the same thing. It would be more accurate to refer to the 'processor package' because there's no real standard to what a the package contains. Very old CPUs from 15-20 years ago contained little more than the bare minimum to execute tasks.

They contained the ALUs, fetch and decode hardware, Instruction pipeline, Interrupt handling hardware, some IO control hardware and that's about it. After this, cache memory was added to the CPU to improve execution

Then, the execution parts of the processor were duplicated. The ALUs, fetch and decode, instruction pipline, and some cache memory were organized into what we now call "cores". Each core is capable of functioning on its own and contain all the resources necessary to perform computational tasks that do not involve interacting with components outside the CPU. IO Control, interrupt handling, etc... were all shared between all the cores.

More recently the memory controller itself has been moved into the CPU package. It sits along side the CPU cores but it is not part of them. Thus it is part of the package, or part of the processor/CPU but it is not part of the 'cores'. Intel used to specifically refer to this as the 'un-core'.

This gets even more complicated when we talk about systems which have multiple physical processor packages installed. Many server and workstation platforms can have 2, 4, or even more processor packages installed. Each processor package contains the same hardware.

Thus, the number of 'cores' in a machine can be computed by taking the number of cores per package and multiplying it by the number of packages in the system. A computer which has two quad core processors has the same number of cores as a computer which has a single octal core processor.

Here is an image of a motherboard that has 4 processor sockets

http://i1-news.softpedia-static.co [...] -RAM-2.jpg

Each one of those processor sockets (the flat ones with all the pins and metal coverings) can hold an AMD Opteron 6100 series processor. Each Opteron 6100 processor has either 8 or 12 cores inside which means that particular system can have between 8 (a single 8-core processor installed) and 48 cores present (4 12-core processors installed).


A dual core processor for a computer is a central processing unit (CPU) that has two separate cores on the same die, each with its own cache. It essentially is two microprocessors in one. This type of CPU is widely available from many manufacturers. Other types of multi-core processors also have been developed, including quad-core processors with four cores each, hexa-core processors with six, octa-core processors with eight and many-core processors with an even larger number of cores.

In a single-core or traditional processor, the CPU is fed strings of instructions that it must order, execute, then selectively store in its cache for quick retrieval. When data outside the cache is required, it is retrieved through the system bus from random access memory (RAM) or from storage devices. Accessing these slows down performance to the maximum speed that the bus, RAM or storage device will allow, which is far slower than the speed of the CPU.
This situation is compounded when the computer user is multi-tasking. In this case, the processor must switch back and forth between two or more sets of data streams and programs. CPU resources are depleted, and performance suffers.

In a dual core processor, each core handles incoming data strings simultaneously to improve efficiency. Just as two heads are better than one, so are two hands. When one core is executing, the other can be accessing the system bus or executing its own code.

To utilize a dual core processor, the operating system must be able to recognize multi-threading, and the software must have simultaneous multi-threading technology (SMT) written into its code. SMT enables parallel multi-threading, wherein the cores are served multi-threaded instructions in parallel. Without SMT, the software will recognize only one core. SMT also is used with multi-processor systems that are common to servers.

A dual core processor is different from a multi-processor system. In the latter, there are two separate CPUs with their own resources. In the former, resources are shared, and the cores reside on the same chip. A multi-processor system is faster than a system with a dual core processor, and a dual core system is faster than a single-core system, when everything else is equal.

An attractive value of dual core processors is that they do not require new motherboards but can be used in existing boards that feature the correct sockets. For the average user, the difference in performance will be most noticeable during multi-tasking, until more software is SMT aware. Servers that are running multiple dual core processors will see an appreciable increase in performance.