What are the differences between a thread and a core in a CPU?

286 views

What are the differences between a thread and a core in a CPU?

In: 14

10 Answers

Anonymous 0 Comments

Imagine you’re a parent doing laundry. There is one application (a load of laundry) which creates different threads of operations (sports, colored, white, …. laundry).

Let’s say there are a few steps in the laundry process: preparing the laundry, going in the washing machine, the dryer, ironing and folding.

One CPU core is one set of resources: someone to prepare, a washing machine, a dryer, an iron and someone to fold. **The most straightforward way to do more laundry is to just have more resources**: more washing machines, more dryers, more irons, and more personnel to prepare and fold everything. This means having multiple cores in your CPU.

But **depending on the workload, not all resources need to be used.** Some laundry does not need to go in the dryer, or does not need ironing or is just way easier to fold. With only a second washing machine, we can already improve our efficiency a lot. We can then put two loads in the washing machines: one that does need drying and ironing, and one that does not. This way we can achieve almost double the performance with only minor increase in resources.

**Summarized:**

A 2 core CPU will have twice the resources of a single core CPU, and can literally perform twice as fast. (Side note: the loads need to be independent of course)

A 2-threaded CPU will have only a few added resources, but with careful scheduling it can approach almost the same performance as if it had fully duplicated resources.

You are viewing 1 out of 10 answers, click here to view all answers.