No : HyperThreading is a system-wide setting available in BIOS.
You can force your app to run on only one processor, but this is meaningless
if your soft is monothread (since it will use only one processor by
definition).
Arnaud
MVP - VC
> > Ok many thanks !
> > But... if displaying 100% will mean running only slightly faster...
[quoted text clipped - 8 lines]
>
> You can force your app to run on only one processor, but this is meaningless
obviously
> if your soft is monothread
of course not, all the scientific codes, need at least two threads, one for
computating, and the other one to control the first, and able the exit of the
computation if necessary without using the Windows tasks killer, and saving
the curent advance of calculations.
The interest is not using only one CPU, but trying to use the whole system
capability, to make the computation shorter. Seeing the task manager refering
to only 50% used according to the duration of computations (hours or more for
computations) is frustrating !...
I wonder also... about the deep meaning of hyperthreading ?
For instance, when the computers used to increase their performance by a 1.5
rate
a year, simply by frequencies speed up in the recent past, they now (durably
or not, I dont know) reach a sort of asymptotic progression (I've just bought
a new 2.8GHz laptop recently, which is only 15% faster than the 2.4GHz I
bought in the middle of year 2002), which doesn't (or I don't know how to)
allow great improvement in my computation time.
Is the philosophy of hyperthreading (I'not informaticien rather scientific,
and then not aware of that) a way to bypass the performances limit obtained
on a CPU by implementing two in a chip, unabling the use of the whole system
power in a single task, except if coordinating (the works of different CPU)
it by a separated thread
in a parallel type like code, as I've done in a deep past on Cray's hardware
(I worked on a XMP in the end of the 80's) ?
Sorry for my ignorance, and many thanks for the answers.
Xav
>(since it will use only one processor by
> definition).
obvious
> Arnaud
> MVP - VC
Carl Daniel [VC++ MVP] - 09 Mar 2005 16:39 GMT
> Is the philosophy of hyperthreading (I'not informaticien rather
> scientific, and then not aware of that) a way to bypass the
[quoted text clipped - 4 lines]
> hardware (I worked on a XMP in the end of the 80's) ?
> Sorry for my ignorance, and many thanks for the answers.
If I understand correctly, Hyperthreading came about as a result of studies
performed by Intel (and others, no doubt) that found that typical code mixes
only utilized about 30% of the CPU core capacity and were largely bound by
memory bandwidth. A hyperthreading CPU still has only 1 set of functional
units (adders, multipliers, etc), but has a double set of registers. With
that extra set of registers (and a second instruction stream) it's possible
to simulate a second CPU in the same chip. The two separate virtual CPUs
compete for the functional units in the core, so having both virtual CPUs
compute-bound frequently results in less throughput than having a single
virtual CPU compute-bound due to internal contention for resources. The big
advantage of hyperthreading in my experience is that a single compute-bound
thread can't completely monopolize the machine - all the other (mostly
blocked) threads can use the second virtual CPU to get work done while the
compute bound thread grinds away. For today's hyperthreaded CPUs, you're
actually getting better throughput at 50% utilization than you would at 100%
in most cases.
Multicore CPUs are the next generation. In a multicore, internal resources
are not shared between cores, so contention is reduced. A multicore design
might have (for example) 4 cores, each with L1 cache, each supporting 2-way
hyperthreading, with a large, shared L2 cache that all core access, yielding
8 virtual CPUs in a single chip.
As multicore/hyperthreading become more common, advances are needed in
inter-thread coordination and communication. The current lock-based
strategies are simply too inefficient and don't scale well - core to run
efficiently on a 100-CPU machine needs to be structured very differently
from code that's suitable for 2 processors.
-cd
sergega4@yahoo.fr - 09 Mar 2005 21:11 GMT
OK many thanks for all those precisions, that's clearer for me now !
Regards
X
> > Is the philosophy of hyperthreading (I'not informaticien rather
> > scientific, and then not aware of that) a way to bypass the
[quoted text clipped - 35 lines]
>
> -cd
Arnaud Debaene - 09 Mar 2005 21:57 GMT
<snip>
A good article on the subject of hyperthreading/multicore and their impact
from a developper view point (and why the actual approach to mutithreading
programming is inadequate) :
http://www.gotw.ca/publications/concurrency-ddj.htm
Arnaud
MVP - VC
sergega4@yahoo.fr - 14 Mar 2005 23:17 GMT
Great, 've read it. It confirms what I noticed these last two years according
to the evolution of the CPU and learn me a lot in hyperthreading. Thanks !
Xav
> <snip>
>
[quoted text clipped - 5 lines]
> Arnaud
> MVP - VC