what is Hyper Threading ?(In layman terms)

Hyper threading is in usage since more than 10 years mainly on Intel processors.yet it is not that famous term.

LaymanTerms :-

Imagine you want to eat your food very fast and eat more food in  less time  so that you can spend your time in other activity , then you have two broad options to achieve your goal

        1)have two or three mouths(or openings into your stomach :p so that more food can be sent inside and could chew fast

or     2)use your both hands in a more efficient manner, i.e when your mouth is chewing the food, fetch food from left hand and feed it to the mouth and when left is feeding make your right hand to bring more food ready for chewing and when right is feeding make your left bring food

Now replace as follows

mouth   :  processor

hands     :   schedulers(which are smart )

food         :    process

following above analogy the first way is implemented in computers using multi-core processors–more mouths more cores

the second way is implemented by the name called as HyperThreading.

but single threaded workloads are not benefited from hyperthreading ,this is because in single threaded process 2 must wait for process 1 to complete and process 3 for process 2..so definitely no way for hyper threading  but in multithreaded workloads it is of much useful.

WHY ? :- We require hyper threading for maximizing processor(CPU) efficiency .definitely it will not increase fastness in process execution but CPU is used to a greater extent efficiently.

Hold on!! yes your confusion that even Multi-core processors can achieve the same CPU efficiency is genuine .

yes multi-core processors are much capable in achieving the goal of Hyper threading even more than that, because your having 2 physical processors rather than 2 logical processors in one physical processor (read this complete article to understand this point)  which is actually much used way

but Many newer model CPU’s are Hyper-Threaded and multi-core, which enables even greater performance. For example, if you have a quad core processor — that’s four cores — with HT, you would have eight virtual cores.

Technical terms:-

For each  core(processor) that is physically visible, the operating system maintains two virtual or logical cores, and shares the workload between them when possible.

Architecturally, a processor with Hyper-Threading Technology consists of two logical processors per core, each of which has its own processor architectural state. Each logical processor can be individually halted, interrupted or directed to execute a specified thread, independently from the other logical processor sharing the same physical core

Unlike a traditional dual-processor configuration that uses two separate physical processors, the logical processors in a hyper-threaded core share the execution resources. These resources include the execution engine, caches, and system bus interface;

Now if you ask what is the benefit of this strategy then it is dependent on the needs of the software, and also obviously on the operating system -how well written to manage the processor(hyper threaded) efficiently

After all -the main aim of this concept is to increase independent instructions in the pipeline–that is what multi-threading has (as we have independent process we can achieve multi-threading)

–took help from Wikipedia


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s