Articles

CPU Vs Core Vs Socket – Let Us Explore the Difference

Computers have evolved dramatically over the past 50 years or so. The evolution was so profound primarily because of the discovery of materials called semi-conductors, which opened the doors to the revolutionary era of solid-state electronics.

What then remained was the refinement of techniques for designing computer architecture and producing the computer components.

The topic at hand relates to the evolution of the Microprocessors or CPUs. This article aims to deal with a common query: “CPU Vs Core Vs Socket”

CPU Vs Core Vs Socket

Let us start off with talking about what a CPU is:

The CPU (Central Processing Unit)

The Microprocessors are the Central Processing Units (CPU) of the computer. The CPU is at the heart of the entire computer architecture and serves the computer as the brain serves us humans.

As the CPU evolved, they started to reach certain limitations as such the Core was introduced as critical component of a CPU.

CPU dyes had different sizes and dimension to cater to number of cores, cache memory, transistors etc inside. As such, the concept of socket on motherboard was introduced.

CPU Components

Following are the components of the CPU,

a. ALU (Arithmetic Logic Unit)

The Arithmetic Logic Unit is where the logical and arithmetic operations like addition, subtraction, AND, OR, NOT etc. take place. It is that component of the CPU where the actual brain-work happens.

b. FPU (Floating Point Unit)

In order to support the ALU with floating point calculations, the Floating Point Unit was provided in the CPU.

Earlier on, the calculations were done by the ALU but were slower because of the many steps involved due to the complexity of decimal.

c. Registers

The registers are components which have been provided for temporary storage of information during the instruction execution.

There are registers reserved for specific use and registers that can be used by the programmer at will. One specific register stores status flags, which are essential for CPU instruction processing.

d. Control Unit

The CPU performs the instruction execution using the Control Unit.

The identification of data, its location, where it will be moved to, which operation will be performed on it etc. are the answers provided by the Control Unit and it also executes the steps accordingly.

e. Cache

The Cache is an intermediate memory space inside the CPU, where the information passing in and out of the CPU is temporarily stored.

Its primary purpose is to boost CPU performance by storing selected information which the CPU is expected to require in the immediate future based on specialized algorithms.

It saves the CPU from fetching instructions from the RAM every time and works in sync with the CPU unlike the slow communication with the RAM.

Also Read: Importance of Cache Memory

f. Front-side-bus

The front-side-bus is the gateway of the CPU. It is directly connected with the memory bus of the motherboard on the outside and to the internal components on the inside.

It operates at the speed of the memory bus which is much less than the CPU speed.

How CPU Works

The CPU is the brain of the computer as I have already hinted in the introduction.

A computer is a programmable machine whose function is to perform tasks that have been programmed into it.

Programs are a set of instructions.

The CPU is the component of the computer where the instructions are executed.

Lets see how all the components add up:

The CPU is designed in a specific way using logic circuits which perform various operations (aka logical gates). The instructions, when fed into the CPU, get the CPU to perform the various operations.

Here, the ALU performs arithmetic and logic operations, the FPU assists the ALU in case of floating-point operations (decimal numbers), the registers are utilized by the program for storing various types of information and the Control unit actually controls and coordinates this process of instruction execution.

The program instructions and data travel in and out of the CPU via the Front-side-bus. The cache is an intermediate storage space which acts as a buffer and keeps the most useful instructions and data stored.

Together, this assembly of components allow the CPU to process the instructions and return the results.

The Fetch-Decode-Execute Cycle

Let us now turn to see what steps a computer takes to execute a program.

A CPU performs the following four basic functions during its process of executing instructions.

Fetch Execute Cycle

Fetch Execute Cycle [Source: Christopher Kalodikis]

a. Fetch

The CPU fetches instructions from the RAM.

b. Decode

The CPU decodes the instructions into binary words (Zero’s and One’). This is done because CPU works under the binary number system and it carries out binary operations.

c. Execute

The CPU executes the instructions according to the commands used in the instructions.

d. Write-back (Store)

The CPU takes the results of the instructions and stores them back in the RAM.

The 4 functions mentioned above are performed in the same sequence and over and over again for all the instructions.

Hence, we can say that the above describes the CPU instruction cycle which gets repeated by the CPU again and again until the program execution stops.

Core

According to the Moore’s law, the number of transistors in a CPU doubles every two years.

This was an observation made during the era when CPUs were continuously designed to be smaller and faster.

The speed of the CPU processing was increased by increasing the CPU clock-speed.

Computers function by periodic electronic pulses which are of very high frequency (Like 500 MHz or 500 Million pulses per second). This is denoted as the clock-speed.

CPU_vs_CORE

Single CPU with Quad Cores

Multiple CPUs Tested

At one point in time, much smaller components could not be manufactured because of the inherent limitations of the laws of Physics, which are out of scope of the article.

Market competition demanded higher speeds so engineers at first designed computers with multiple CPUs working in parallel.

That also meant a change in the program instructions to utilize both CPUs.

This did not allow much increase in computing speeds because the CPUs communicated with each other through the front-side-bus and had to communicate at the speed of the bus which was much slower.

So basically, multiple CPUs was not the right solution for the ever higher demand of higher speeds by the market.

The Core as the Answer

The answer to the problem of bottlenecks in multiple CPUs was to let the CPUs communicate with each other directly; a hybrid approach.

This encouraged the engineers to design multiple CPUs architecture on a single die or chip.

They duplicated most of the components and kept the power connection, mounting, heat-sink and front-side-bus as common.

The duplicated components were in principle the COREs of the CPU. Hence began the every increasing number of cores in CPUs.

So, the new CPUs now had much higher speeds and came with multiple Cores.

The CPU components ALU, FPU, Registers, Control Unit and Cache, together form the Core of the CPU.

In other words, each core has its own set of ALU, FPU, Registers, Control Unit and Cache (L1 and L2 only).

Also Read: Does Each Core Have Its Own L1 and L2 Cache?

Some further points on Core Vs CPU

  1. The word Core has importance for CPUs having multiple Cores only. In case of a single Core in a CPU, all the components together are simply called the CPU.
  2. The Core can also be called the CPU when it is being discussed in logical terms according to its function as a CPU.
  3. A multi-core CPU is visible in the Operating System as 4 CPUs. This reinforces the consideration of a Core as a CPU in logical terms.
  4. A Core must not be confused with logical processor. Core is a physical entity, logical processors are summation of Cores + Threads

Also Read:

CPU Socket

Motherboard socket

A typical motherboard socket

A CPU Socket, as the name suggests, is the physical quote-UN-quote “plug” in which processor is inserted on to the motherboard.

If you buy a CPU/Microprocessor from the market and want to install it by yourself inside the computer, you would be knowing that CPUs are mounted onto Motherboards.

Now, every motherboard obviously has a designated place for CPUs. This designated place has a “Socket” as a built-in feature of the motherboard that accepts a Single Physical CPU Chip.

The socket provides the CPU with power connection as well as data bus connectivity.

You would, of course, know that the mounting of the CPU has to be done slowly and very carefully, so as not to damage the socket or the pins that provide connectivity to the CPU.

The key fact to note here is that one socket is for exactly one CPU, but the CPU itself could be having any number of cores subject to the limitations of the motherboard.

Every motherboard has a specified range of CPUs that can be mounted onto it.

In other words, sockets on the motherboard are not all the same. Motherboards have a specified socket number/model that they support.

A CPU, therefore, is also designed based on that socket.

For example the Core i7-9700K has a FCLGA1151 socket. Therefore, when you choose the compatible motherboard, you will make sure that motherboard also has the same socket.

supported socket

Core i7-9700K Supported Socket [Source: Intel]

Commercial motherboards only have single socket. However, industry grade motherboards like those of servers grade computers can have multiple sockets.

Sockets in Server Motherboards (Multiple CPU Sockets)

Understandably, servers are large and high-performance machines.

Their greater performance comes from faster hardware and multiple quantities of hardware.

The following two examples explain how sockets fit into the equation of computer hardware in case of servers.

So, the server hardware configuration might include a motherboard which supports two CPUs, where each CPU could have 4 or 8 cores for example.

dual sockets

Dual Sockets for Intel Xeon Processors [Source: AnandTech]

So, in this case the motherboard will be having two CPU sockets. In this case the motherboard would be designed so that both the sockets are be served by the same memory.

Similarly, the server hardware configuration might include multiple motherboards, where each motherboard supports two CPUs so would be having two sockets.

Final Word

You have seen how the CPU, the Core and the Socket compare with each other.

I will now discuss all the three together so that you can have an even better insight on how the three compare with each other.

  1. The Socket is a hardware on the motherboard which accepts the CPU for its mounting on the motherboard. The Socket thereby connects the CPU with the motherboard circuitry.
  2. One socket accepts exactly one CPU.
  3. The CPU components ALU, FPU, Registers, Control Unit and Cache, are collectively called the Core of the CPU. These are the replicable components of a CPU and their replication produces multi-Core CPUs which act like multiple CPUs on a single chip.
  4. 2 CPU having multiple Cores each can be mounted on a motherboard having 2 Sockets where each Socket will accept 1 CPU. Multiple sockets are generally found on server grade motherboards.