Core, process & thread - What is the difference?

By Prajwal Haniya

Techletter #103 | December 14, 2024

In this techletter, let us understand the following terms

Core, process, concurrency, parallel processing, multi-processing, thread, multi-threading, hyper-threading.

What do you mean by a core?

A core is the “brain” of a CPU. It is the processor within your computer that executes instructions and processes data.

A processor is the entire chip that plugs into your motherboard whereas cores are the individual processing units within that chip.

A processor with two cores is called a dual-core processor;

with four cores: a quad-core;

six cores: hexa-core;

eight cores: octa-core;

What do you mean by a process?

A process is an independent program in execution, containing its own memory space and system resources. It represents a complete instance of a running application, including the program code, current activity, and allocated resources.

Usually, when you run a Python script, your code at some point becomes a process, and the process runs on a single core of your CPU.

But modern computers have more than one core, so what if you could use more cores for your computations, it will be faster.

The idea behind parallelism is to write your code in such a way that it can use multiple cores of the CPU.

What is the difference between multiprocessing and parallel processing?

What do you mean by cores of a CPU?

The number of cores in a system determines how many programs and tasks it can execute at once.

What do you mean by threads?

A thread is a sequence of instructions given to the CPU by a program or application. The more threads a CPU can execute at once, the more tasks it can complete.

What is the difference between a thread and a process?

What is multithreading?

When multiple threads are running simultaneously, it’s called multithreading.

Modern processors support hyperthreading, a technology that allows one physical core to be divided into two virtual cores,

This allows the CPU to work on multiple execution threads simultaneously.

References:

https://www.baeldung.com/cs/core-vs-cpu

https://www.intel.com/content/www/us/en/gaming/resources/hyper-threading.html

https://www.liquidweb.com/blog/difference-cpu-cores-thread/