受欢迎的博客标签

Multiple Core Processors

Published

Multiple-core processors have been available in personal computers since the early 2000s. Multi-core designs addressed the problem of processors hitting the ceiling of their physical limitations in terms of their clock speeds and how effectively they could be cooled and still maintain accuracy. By moving to extra cores on a single processor chip, manufacturers avoided problems with the clock speeds by effectively multiplying the amount of data that could be handled by the CPU.

 
When they originally were released, manufacturers offered just two cores in a single CPU, but now there are options for four, six and even 10 or more. In addition to adding cores, simultaneous multithreading technologies—such as Intel's Hyper-Threading—can double the virtual cores that the operating system sees.

Processes and Threads


A process is a specific task, like a program, running on a computer. A process consists of one or more threads.

 
A thread is simply a single stream of data from a program passing through the processor on the computer. Each application generates its own one-or-many threads depending upon how it is running. Without multitasking, a single-core processor can only handle a single thread at a time, so the system rapidly switches between the threads to process the data in a seemingly concurrent manner.

 
The benefit of having multiple cores is that the system can handle more than one thread simultaneously. Each core can handle a separate stream of data. This architecture greatly increases the performance of a system that is running concurrent applications. Since servers tend to run many concurrent applications at a given time, the technology was originally developed for the enterprise customer — but as personal computers got more complex and multitasking increased, they too benefited from having extra cores.

Hyper-Threading

Hyper-threading was Intel’s first attempt to bring parallel computation to consumer PCs. It debuted on desktop CPUs with the Pentium 4 HT back in 2002. The Pentium 4’s of the day featured just a single CPU core, so it could really only perform one task at a time—even if it was able to switch between tasks quickly enough that it seemed like multitasking. Hyper-threading attempted to make up for that.

A single physical CPU core with hyper-threading appears as two logical CPUs to an operating system. The CPU is still a single CPU, so it’s a little bit of a cheat. While the operating system sees two CPUs for each core, the actual CPU hardware only has a single set of execution resources for each core. The CPU pretends it has more cores than it does, and it uses its own logic to speed up program execution. In other words, the operating system is tricked into seeing two CPUs for each actual CPU core.

Hyper-threading allows the two logical CPU cores to share physical execution resources. This can speed things up somewhat—if one virtual CPU is stalled and waiting, the other virtual CPU can borrow its execution resources. Hyper-threading can help speed your system up, but it’s nowhere near as good as having actual additional cores.

Thankfully, hyper-threading is now a “bonus.” While the original consumer processors with hyper-threading only had a single core that masqueraded as multiple cores, modern Intel CPUs now have both multiple cores and hyper-threading technology. Your dual-core CPU with hyper-threading appears as four cores to your operating system, while your quad-core CPU with hyper-threading appears as eight cores. Hyper-threading is no substitute for additional cores, but a dual-core CPU with hyper-threading should perform better than a dual-core CPU without hyper-threading.

Multiple Cores

Originally, CPUs had a single core. That meant the physical CPU had a single central processing unit on it. To increase performance, manufacturers add additional “cores,” or central processing units. A dual-core CPU has two central processing units, so it appears to the operating system as two CPUs. A CPU with two cores, for example, could run two different processes at the same time. This speeds up your system, because your computer can do multiple things at once.

Unlike hyper-threading, there are no tricks here — a dual-core CPU literally has two central processing units on the CPU chip. A quad-core CPU has four central processing units, an octa-core CPU has eight central processing units, and so on.

This helps dramatically improve performance while keeping the physical CPU unit small so it fits in a single socket. There only needs to be a single CPU socket with a single CPU unit inserted into it—not four different CPU sockets with four different CPUs, each needing their own power, cooling, and other hardware. There’s less latency because the cores can communicate more quickly, as they’re all on the same chip.

Windows’ Task Manager shows this fairly well. Here, for example, you can see that this system has one actual CPU (socket) and four cores. Hyperthreading makes each core look like two CPUs to the operating system, so it shows 8 logical processors.

Multiple CPUs

Most computers only have a single CPU. That single CPU may have multiple cores or hyper-threading technology—but it’s still only one physical CPU unit inserted into a single CPU socket on the motherboard.

Before hyper-threading and multi-core CPUs came around, people attempted to add additional processing power to computers by adding additional CPUs. This requires a motherboard with multiple CPU sockets. The motherboard also needs additional hardware to connect those CPU sockets to the RAM and other resources. There’s a lot of overhead in this kind of setup. There’s additional latency if the CPUs need to communicate with each other, systems with multiple CPUs consume more power, and the motherboard needs more sockets and hardware.

Systems with multiple CPUs aren’t very common among home-user PCs today. Even a high-powered gaming desktop with multiple graphics cards will generally only have a single CPU. You’ll find multiple CPU systems among supercomputers, servers, and similar high-end systems that need as much number-crunching power as they can get.

 

 

Conclusions

For the most part, having a higher core count processor is generally better if your software and typical use cases support it. For the most part, a dual-core or quad-core processor will be more than enough power for a basic computer user. The majority of consumers will see no tangible benefits from going beyond four processor cores because so little non-specialized software takes advantage of it. The best use case for high-core-count processors relates to machines that perform complex tasks such as desktop video editing, some forms of high-end gaming, or complicated science and math programs.