I have been reading lately about system architecture
and the topic of multi-threading
has not been covered in detail with latest improvements in technology. I did my part of search, but could not find answers for the following:
The questions have are
1) Is multi-threading
dependent on the system architecuture (CPU)
. do all CPU (single core)
support multi-threading
? If it does not, what happens to multi-threaded
applications when run on those machines
It is cited here that
Intel CPUs support multithreading, but only two threads per CPU.
AMD CPUs do not support multithreading and AMD often sites Microsoft's
recommendations to turn off Hyperthreading on Intel CPUs when running applications
like peoplesoft and Exchange.
2) so what does it mean it say only two threads per CPU
here. At any given time, CPU (single core)
can process only thread
. and the other thread
is waiting to be processed correct?
3) how is it different from an application that spawns, say, 10 threads
and waiting for them to be executed. If the CPU at the most can tackle only two threads
, shouldn't programmer keep that fact in consideration when writing multi-threaded applications
.
Even with multi-core processors (say quad-core)
at the most 8 threads can be queued
, but only 4 threads
can be processed at the same time.
P.S: I have a read a little about hyper-threading
but I am not sure if that is relevant here and if
all processors support hyper-threading