What EXACTLY are multiple cores?

Envy

Obliviot
Multiple cores have always been confusing to me. For example, is a 3.0ghz single core processor equivalent to a 3.0ghz Dual core processor? Meaning both cores would be 1.5 ghz? Or would a dual core be twice as fast? Meaning TWO 3.0ghz making it pretty much 6.0ghz?
 

Tharic-Nar

Senior Editor
Staff member
Moderator
No, is the short answer to the above, lol. If you had 2 Cores runnign at 3Ghz, you have... 2 Cores runnign at 3Ghz, you don't combine the speed, it just allows it to do 2 different things at the same time. A Core is a processing unit, in that it is a processor unto itself. Multiple cores is like having multiple processors, but on the same chip.

The old example is like a highway with lanes of traffic. 2 lanes, with a speed limit of 70mph does not make it the equivalent of a single lane with a 140mph limit. If you have 4 lanes, they are still limited to 70mph, but you can have more cars running across it.

Another is a library. You walk in, ask for a book, they walk off and get it for you. You tell that one person to get 2 books, it takes twice as long. Enter the second assistant. You ask each assistant to get a different book, they both get the 2 different books but finish at the same time.

Each Core can operate on 1 thread at a time, and a thread is a single set on consecutive instructions belonging to an application. Each Core can work on only one thing at a time, but due to it's speed, it looks like it's operating on multiple threads at a time. When you introduce a second core, it allows it to work on 2 different tasks simultaneously, 4 cores, 4 threads, and so on. All working at the same speed, just different tasks.
 

Envy

Obliviot
No, is the short answer to the above, lol. If you had 2 Cores runnign at 3Ghz, you have... 2 Cores runnign at 3Ghz, you don't combine the speed, it just allows it to do 2 different things at the same time. A Core is a processing unit, in that it is a processor unto itself. Multiple cores is like having multiple processors, but on the same chip.

The old example is like a highway with lanes of traffic. 2 lanes, with a speed limit of 70mph does not make it the equivalent of a single lane with a 140mph limit. If you have 4 lanes, they are still limited to 70mph, but you can have more cars running across it.

Another is a library. You walk in, ask for a book, they walk off and get it for you. You tell that one person to get 2 books, it takes twice as long. Enter the second assistant. You ask each assistant to get a different book, they both get the 2 different books but finish at the same time.

Each Core can operate on 1 thread at a time, and a thread is a single set on consecutive instructions belonging to an application. Each Core can work on only one thing at a time, but due to it's speed, it looks like it's operating on multiple threads at a time. When you introduce a second core, it allows it to work on 2 different tasks simultaneously, 4 cores, 4 threads, and so on. All working at the same speed, just different tasks.

Thank you for the explanation now :)
 

Optix

Basket Chassis
Staff member
I remember back in the beginning days of the Pentium D's there were a lot of eBay sellers and even well established eTailers that were touting them as 6Ghz processors when it was really two cores running at 3Ghz.

I raffed.

Rah, rah, rah.

Like that.

Should we confusing you with hyper threading and logical cores next?
 

Envy

Obliviot
I remember back in the beginning days of the Pentium D's there were a lot of eBay sellers and even well established eTailers that were touting them as 6Ghz processors when it was really two cores running at 3Ghz.

I raffed.

Rah, rah, rah.

Like that.

Should we confusing you with hyper threading and logical cores next?

I have no idea what those are XD
 

Tharic-Nar

Senior Editor
Staff member
Moderator
Hyper threading, an intel invention (by name) designed to squeeze more power out of a processor by allowing a single core to operate on 2 threads simultaneously.... but, if i take the highway example, it'll be like fitting 2 motorbikes in a single lane rather than 1 car... sure, you can have more traffic running through it but it's not quite the same. Translation, you get a performance increase, but it's about 20-30%, not quite the same as a real core, but it makes a difference.

Virtualization, is like having a car come onto the highway, then leave as mysteriously as it came, running in parralel with traffic, but no one sees it, like a robin reliant... or a hamster running across the ether playing a banjo with a dog barking away behind it... no one really knows what's happening, but it all makes sense to the traffic coordinator.

Clustering is like Spaghetti Junction, no one knows where they're going but you end up at your destination regardless.
 

Tharic-Nar

Senior Editor
Staff member
Moderator
Librarian:

HyperThreading:
You ask the assistant for a book, he goes to retrieve it, you follow him and then ask him to get another book as well. You both arrive back at the desk where you collect.

Virtualization:
You walk into a library and ask for a book, the assistant sits there idly, then spontaneously gets up and retrieves 3 books, to which are collected by a Fruit Salesman, a window cleaner and a Penguin. He then turns to you and says 'Yes'. He waits a minute, turns around, feeds his dog and then asks another assistant to collect your book.


Clustering:
You walk into a library and ask for a book, to which 50 assistants scramble around the whole library, some talk to one another, some phone up other library's asking if they have a copy, these libraries with another 50 assistants go off looking for the book as well, all phoning each other up, to which they all reply to the original assistant saying they don't have that book and do you wish to have it ordered in.
 
Last edited:

Optix

Basket Chassis
Staff member
Bravo @ Tharic-Nar.

As was mentioned, hyper-threading will never beat a true, physical core but it's a nice little boost for those who do minor encoding and the like.
 
My understanding of HyperThreading is that it only kicks in when a core's "main" process is stuck waiting for data from memory, and instead of leaving that core idle and waiting, it switches off to a backup process.

To use the library analogy:

I walk up to the help desk for assistance finding two books. I don't know the author, so I ask the assistant to look up the first book. While his computer is busy searching, I ask about the second book.
 
Last edited:

Tharic-Nar

Senior Editor
Staff member
Moderator
The analogies are somewhat oversimplified, since trying to explain the act of simultaneous multi-threading technologies (SMT - of which HyperThreading is an implementation of) is quite difficult, since HTT has changed somewhat (on a technical level) from its introduction with the old Xeons and Pentium 4's. In the case of HTT, multiple instructions can be issued to the processor on the same clock cycle, rather than interleaved over multiple cycles. The result is that instructions can be sent to the processor faster, but the processing time of those instructions stays the same. The side-effect is that since the processor has multiple instructions ready, it can execute them in sequence in the same clock cycle, rather than waiting for the first one to clear and sending the second instruction on another cycle - resulting in your 'less idle time' comment. Though one could argue that SMT is just a nifty scheduler with an extended cache, since 2 or more threads are not actually being worked on at the same time, they are just being passed on more efficiently with less idle time on the cpu, hence why they'll never be equal to that of a real physical core.

If you want to be accurate, it would be more like 2 or more people asking simultaneously - a single assistant to fetch 2 or more books and then creating a schedule as to how to retrieve them in the most efficient manor. If one book is too far away or too heavy, he'll retrieve the first book then return for the second. There aren't 2 assistants, otherwise that's a dual core. The OS just displays 2 CPU's to simplify the process for the software.
 
Last edited:

Kougar

Techgage Staff
Staff member
I found those analogies to be highly amusing... but now I gotta quibble just a bit with that last one just for anyone that is really curious to know.

Out-of-Order design CPU's do in fact execute code non sequentially, and Pyschosomatic is quite right in that respect.

A CPU isn't just a single stage engine... There are multiple segments of a CPU core performing different tasks every clock cycle. (Sort of like workers along a manufacturing line, each one doing work any given second) The execution core itself has multiple specialized execution engines inside a single core, and (just like each individual line workder) each execution engine can execute its own specialized x86/x64 instruction type per clock cycle. If program A is not using every single execution engine, then program B can use whatever is not being used simultaneously while program A is being executed... the CPU itself makes this happen by arranging x86/x64 instructions in queue ahead of time, so that every execution engine is executing some instruction. So in fact yes, the CPU is actually executing multiple programs simultaneously.

Hyperthreading ensures that the CPU has more instructions in queue to re-order, the more instructions in buffer the more it can ensure no parts of the CPU core remain unused. This also plays a role in fusion, where the CPU notices specific instructions in queue and can fuse them together... multiple x86 or x64 operations (single instructions) are fused into one single operation that requires half the processing cycles.

Now scale this up to four or six cores, and suddenly Hyperthreading becomes a very real benefit. This is why even with a single program 100% loading a Quad-core CPU with a similar workload (rendering, folding@home, encoding, etc), adding Hyperthreading can increase performance by another 30%, sometimes more and sometimes a little less. Performance might increase by a third, but the additional logic/silicon required in the CPU to make hyperthreading possible is somewhere around 5-10%.

Here's an articling explaning the distinctions on hyperthreading: Introduction to Multithreading, Superthreading and Hyperthreading

This article builds on the first, and brings it up to date with how Nehalem changes the front-end of the CPU to better handle hyperthreading. Nehalem's core
 

Tharic-Nar

Senior Editor
Staff member
Moderator
I guess i'm just thinking too old hat and haven't taken into consideration the advances made in CPU's past the P4, but that's not entirely my fault, i actually run a P4 :p (A P4 HT Prescott - like the article). Since the Core architectures and such came out a while after and i couldn't afford to get them at the time, i didn't read into them and the architecture behind them. I did read about them, but it was more a passing interest than anything else, so much of the details have washed away.

I'll stick to simplifying things rather than keeping them accurate :D.

Still, the links are a good read, i can brush up a bit, didn't realize i was still stuck in 2002 (first article age).
 
Last edited:
Top