What exactly is the difference between a multi-threaded and a multi-core cpu in principle?

116 views

I’ve gone through various threads on this topic, yet there exists a question of mine left unanswered by the threads

From what I can understand, a single thread can perform multiple tasks “simultaneously”, in that it swaps between multiple tasks, dumping one, picking another, heading back to the first task picking up from where it’d left off and so on

Multiple threads, from what I assume, allows you to possess multiple threads swapping between multiple tasks

For instance, if I had a single core single threaded system, with two tasks to compute, the sole thread in the system would have to periodically switch between the first and the second task
Bumping it up to a single core dual threaded system, I could then delegate each thread to one of these tasks in question, allowing me to simultaneously compute and perform said tasks

Which brings me to multi-core systems. Wouldn’t a dual core single threaded system more or less end up delegating each of the single threaded cores to each of the tasks at hand? From what I hear, the sole differences would be in each core being in possession of **slightly** different system resources (I’d heard some multi-core chips share a portion of the cache)

I’m sure I am getting something wrong here. What really is the difference between, say, a single core dual threaded system and a dual core single threaded system? Both systems can allow for the simultaneous handling of 2 tasks right? If the two tasks happen to be spawned by the same process, I can see why they’d want to remain on the same core ( since they would want to access the same resources, thus necessitating the usage of a single core dual threaded system)

Is there anything else? Or have I gotten it wrong entirely?

In: 5

3 Answers

Anonymous 0 Comments

Multi-threaded and multi-core are two sides of the same coin. Multi-threaded is a property of software that defines discrete lines of processing (threads) that generally do not depend upon each other. Multi-core is a property of a CPU that allows it to process multiple threads at once.

You could think of a thread as like its own separate application (process) that can be run simultaneously with another application (multi-tasking). Except that a single application can also be broken into multiple threads, so we use separate terminology for processes vs threads. For example it’s common for an application to at least have one thread for the GUI and one for the app logic, so the GUI doesn’t freeze up while it’s doing some heavy processing tasking. But the point of multiple threads is that they generally *don’t* need to access the same resources.

A core on the other hand is the main computation component of a CPU. CPUs have several different jobs: the manage the memory (RAM) usage, talk to other system hardware (I/O & buses), they have some temporary memory to store work in progress (cache), maybe they have built-in graphics processing (GPU), and they have a pipeline that parses the instructions received and distributes work to the core(s). But to run multiple threads at once they only need to duplicate the cores, which is the component where all the math and logic is processed, along with each core having some cache of its own.

As such there isn’t really anything called a “dual core single threaded system”. A system might have a dual core CPU (able to process 2 threads simultaneously), but pretty much all modern operating systems will support and use multiple threads themselves, as well as the applications that run under them.

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