views:

193

answers:

1

What languages can hyper-threading be implemented in? Is it only part of Object Oriented systems or can it be implemented in C?

Thanks.

+7  A: 

Any language and runtime that supports threads will support hyperthreading.

Hyper-threading is a way of multiplexing a CPU between multiple threads - there is only one real CPU but it is visible to the operating system as two CPU's, and thus two threads can be scheduled on it. Any stalls in the CPU on one thread (like waiting on memory, long FPU operations, etc.), allow the CPU to execute code from the other thread.

More info on hyper-threading at Wikipedia.

Michael
It's actually finer-grained even than that. Different computational units (arithmetic, floating point) can be simultaneously computing results of instructions from different threads.
Drew Hoskins
Yeah ... a more complete answer would give this in the context of out-of-order execution and pipeline stalls but I didn't want to compress the 700 pages of Hennessy and Patterson into an answer here :)
Michael
Actually, I'm not sure if different computational units simultaneously is possible in the case of the Atom since it is an in-order part.
Michael