Wednesday, February 16, 2011

Quad core vs Dual core - Facts You Need to Know

The main misconception that people have about multi-core processors that don't multiply the speed of one core by the number of cores to get the "total" speed of a multi-core processor. The two processors in this example actually perform at the same speed. The truth is, less than 1% of software on the market can utilize multiple cores, which means that most of your programs (probably all of them) can only run in one at a time. This means that the speed of your programs are fully dependent on the speed of a single core.

What are the advantages/disadvantages of Quad-Core vs. Dual-Core?


Dual-core
- Less power consumption
- Less heat generation
- Better overclocking capabilities
- Lower price
- At the same price point, a dual-core generally has a higher stock/overclocking speed

Quad-core
- Higher power consumption
- Higher heat generation
- Lower overclocking capabilities
- Higher price
- Even with double the cores of dual-core, the improvement in any given application that supports 4-cores is not doubled! (note : The folding program is one exception, where you can get almost double the computation with quads!!!)



Thread
A thread in computer science is short for "thread of execution". It is is a stream of instructions from a certain program. Threads are a way for a program to fork (or split) itself into two or more simultaneously (or pseudo-simultaneously) running tasks.
The OS bundles instructions in threads so that it can effectively simulate multitasking (i.e. running 2 programs at once). The CPU basically processes one thread, then switches to another thread (this is term as "context switching"). By doing this very fast at a fixed interval (this is term as "time slice"), it can simulate the illusion that it's running 2 programs at the same time.
For example, if you have a single core CPU, and are running a few programs simultaneously, you can observe that all the programs/tasks are running together without any problems..... It may look like multitasking (as you are running a few task simultaneously) but in reality, it is just an illusion.....

Multi-threading
Multithreading refers to the capability of an application/game to execute different parts of it's program, called threads, simultaneously. This can only be done if the application/game was designed and programmed to do multithreading. Single-threaded programs cannot run this way because it was not programmed as such.

Super-threading
Also know as time-slice multi-threading:
A multi threading approach that weaves together the execution of different threads on a single processor without truly executing them at the same time. It is motivated by the observation that the processor is occasionally left idle while executing an instruction from one thread. Super-threading seeks to make use of unused processor cycles by applying them to the execution of an instruction from another thread (Wikipedia).

Hyper-threading
Also known as simultaneous multithreading (SMT).
An Intel-proprietary technology used to improve parallelization of computations performed on PC microprocessors via simultaneous multi threading. It is an improvement on super-threading (wikipedia).
Hyper threading was originally introduced by Intel in the single-core Pentium 4 processors. Intel claims up to a 30% speed improvement compared against an otherwise identical, non-simultaneous multi threading Pentium 4. The performance improvement seen is very application-dependent, however, and some programs actually slow down slightly when Hyper Threading Technology is turned on (Wikipedia).


Hyperthreading results in a simulated second virtual core within a physical core CPU (single core) and was the first step to take advantage of multi-threaded applications on the desktop. In other words, hyperthreading makes a CPU with a single core pretend to be two so that none of the CPU is being wasted when running programs that don't use the CPU to its full potential.
Except for its performance implications, this innovation is transparent to operating systems and programs. All that is required to take advantage of Hyper-Threading is symmetric multiprocessing (SMP) support in the operating system, as the logical processors appear as standard separate processors.
Remember that hyper threading can only run on CPUs that have the Hyper-threading technology. Intel is again introducing the hyper-threading technology in the upcoming Nahelem core. This technology would simulate four additional threads in quad-core processors (you could say a virtual 8 core CPU!) and eight additional threads in eight-core processors (for a total of 16).

Summary
Based on current environment, this is my humble opinion....
In reality, the quad-core is ahead of software development, especially in mainstream consumer applications and games. Many quad core owners may be under utilizing their quad core, which, if replaced with a similarly priced dual-core, would probably resulted in more advantages in every aspects of computing/gaming.
By the time software development catches up with current hardware (if it ever does but at least with multi threading), a new generation of quad-cores or even octa-cores might have been rolled out. At that time, the multi-cores would be in a better position to take advantage of multi threaded software/games as compared to now.


In conclusion, if you are contemplating quads but not really using multithreaded software/games, remember that a similarly-priced dual-core might be a better option.