Archived from groups: alt.comp.periphs.mainboard.asus (
More info?)
Hi,
Hyperthreading != Multithreading != SMP
SMP requires - as its name implies - Multiple Processors in a Symmetric
environment. This is where each processor is an (almost) equal peer on the
system. (One processor is the boot processor so has a dominance during
boot). Each processor has equal addressing capabilities to the entire
address space and equal access to the entire bus system. (NUMA systems are
designed to support Non-Uniform access to memory and each group of
processors may have localised memory and localised peripheral buses hence
the name - EG opteron multi processor above 4 processors.)
On an SMP system, if you run a Multi-Programming operating system then two
programs can be executing at the same time. Not timesliced, but actually
running. On an SMP system with a Multi-threading operating system then any
two threads can be scheduled for execution at the same time. AKAIK all
Multithreading systems are Multi Programming, but not all Multi Programming
systems are Multithreading (IE most variants of Unix - some may have changed
in recent years).
Windows is multithreading. A program consists of a minimum of 1 thread - the
primary thread. Most programs have only 1 thread, and when the programmer
writes ordinary code they seldom write for more than one thread. If a
programmer writes to use more than one thread then they have to be hugely
aware of what they are doing because suddenly two paths of
execution(threads) may be active simultaneously in the program so the
programmer has to be careful about access to memory that is common to both
threads. This is where the amateurs get sorted out and a lot of software
written neively for mutlthreading breaks. It is very common to write what
seems like a simple single threaded program to find that the program creates
at various points invisibly to the original programmer other threads. EG if
you use many of the common database management systems these often run with
multiple threads quite invisibly to the programmer. You can see how many
threads a process is running in Task Manager - Ctrl Alt Delete / Task
Manager, click on the Process tab and on the View menu click Select Columns
and tick the Thread Count.
HT on the other hand is a purely Intel invention. Not much to do with
Multithreading at all apart from the fact that it is possible for 2 threads
to now run on an HT processor at the same time - with large constraints
since there is no complete second processor, only a part of one. Basically,
HT is where the pipeline (the thing in the processor that extracts the next
instruction, locates and fetchs operands, checks to see if there is actually
anything to do and so on) in the Intel processor can see that two
instructions ready for execution do not share inputs and outputs so can be
executed at the same time - so a split occurs into parallel execution.
Some Pseedo code to illustrate a HT sort of friendly function:
array inData[256], outData[256]
- inData is initialised
int x, count
for x = 0 t0 count - 1
outData[x] = SomeFunction(inData[x])
next x
Where SomFunction has no side effects other than performing a function on x
and returning the result.
Notice that none of the calculations are reliant on the results of any of
the previous calculations.
HT Friendly loop part:
for x = 0 to count -1 step 4
outData[x] = SomeFunction(inData[x]) <- these can run at the same
time
outData[x + 1] = SomeFunction(inData[x + 1]) <- these can run at the
same time
outData[x + 2] = SomeFunction(inData[x + 2]) <- these can run at the
same time
outData[x + 3] = SomeFunction(inData[x + 3]) <- these can run at the
same time
next x
Here the programmer has written the code such that even a dumb compiler can
produce HT friendly code. This is called loop unwinding and is one of many
techniques. Smart optimising compilers do this kind of thing themselves.
Whatsmore, how many execution units does an AMD Athlon have? Hmmmm 3 integer
and 2 floating point? How many does Intel have? Hmmm. Oh is that why AMD
goes better at a lower clock speed?
Code can be written to facilitate HT - Intel has a library of routines
optimised for HT. The Intel opimising compiler generates code that is
strongly HT supportive. IE it can go out of its way to produce code that
supports well the HT capabilities of the processor. Having said all that at
the end of the day, unless you use the Intel compiler and or pick up on HT
friendly techniques you will only see an average performance improvement
when using HT since the chance of parallel execution is just Luck. Some
software is hand optimised for pre / non HT hardware systems. In this case
running the software on a HT system can be damaging for performance.
Personally I do not believe that a program crash will be due to HT - it is
far far more likely to be due to shoddy multithreading. I don't think Intel
would design a processor where it would chose and execution sequence that
intentionally differed from the programmers and compiler standards just to
squeek out a new mareting term.
- Tim
"James Bald" <Rutherford@NOSPAM.ever> wrote in message
news:V7SdnTsfAZixC07dRVn-sQ@look.ca...
> Specifically about Quake3, only one settings will allow HT use, and it's
> unfortunately called SMP support, while it should work under HT hardware
> as well.
>
> The incompatibilities issues for HT might be another VIA story...Who
> knows.
> You might be interested to check out about VIA's HT problems later.
>
>
http://www.teamits.com/connection/trends/hyperthreading.php
> I have yet to find one of my old software incompatible with HT technology.
>
> But it seems that there are:
>
http://www.ntcompatible.com/story15881.html
> Most of the issues seem to be related to Micro$oft server softwares and
> new licensing difficulties... Just use Linux Server solutions under Kernel
> 2.6+
>
> Otherwise, it works and this article about Multimedia processing proves
> it.
>
http://www.osnews.com/story.php?news_id=2962
>
> Anandtech explains Hyperthreading in details
>
http://www.anandtech.com/showdoc.html?i=1576
>
> "OS support is required to enable multithreading while
> application support is necessary in order to gain a
> tangible performance increase out of having multiple processors
> (in most cases)" -Anand.
>
> If the Motherboard Chipset and BIOS supports it; If the OS supports it,
> then the application only has to support multithreading in order to use
> it.
>
> Intel's final words:
>
http://developer.intel.com/technology/hyperthread/index.htm
> "This technology is largely invisible to the platform. In fact,
> many applications are already multi-threaded and will automatically
> benefit
> from this technology. However, multi-threaded applications
> take full advantage of the increased performance that
> Hyper-Threading Technology has to offer, allowing users
> will see immediate performance gains when multitasking. "
>
> What kind of older programs do you see crash DaveW ?
>
>
>>DaveW wrote in message <6PKAc.74962$Sw.39539@attbi_s51>...
>>First of all, HyperThreading is NOT the same as SMP, just to clear that
>>up.
>>And a lot of older programs cannot be used with HyperThreading enabled, or
>>you'll get freezes and crashes.
>>
>>--
>>DaveW
>>
>>
>>
>>"Noozer" <postmaster@127.0.0.1> wrote in message
>>news:j7EAc.803254$Ig.13431@pd7tw2no...
>>> Just wondering...
>>>
>>> Using a P4C800E-Dlx mainboard with a 2.8Ghz CPU with Hyperthreading...
>>> Should Quake 3 be able to run in SMP mode (multi-processor mode)?
>>>
>>> Would there be an performance increase? How about other programs?
>>>
>>> Just wondering. Video is an ATI 9600XT if it matters.
>>>
>
>
>
>