Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

A processor "core" is a physical processing unit on the die (the silicon wafer -

the actual chip). Older CPUs have only one core per chip. For these, to get two
processing units (cores) you must have a motherboard with two separate CPU sock
ets. With two physical CPUs, communication between the CPUs has to go out one CP
U socket, across the motherboard support circuitry, and in through the socket of
the second CPU. This is considerably slower than the speed at which things take
place inside the circuitry on the same chip. So to increase processing speed, a
nd to lower manufacturing and end-user costs, individual CPUs were designed to h
ave more than one processing unit (cores) on the chip. So a 2-core CPU is very m
uch like having two separate CPUs but is less expensive and can often be faster
than two single-core CPUs of the same capability because of the increased commun
ication speed between them, and because they can share common circuitry such as
a cache. A processor "thread" is an execution sequence active in a processor (co
re). By definition, a single-core CPU can have only one thread active at a time.
A 2-core CPU can have up to two threads active (one per core); but only one per
core. In a simplistic view, a thread (a sequence of steps to be executed) is co
nstructed in a "pipeline" and then "scheduled" for execution by a CPU core. Once
a thread is scheduled, the CPU core is executing the pipelined instructions. Fr
equently, while the thread is executing, the CPU needs more information than jus
t the series of instructions: it needs data. These data values may be only a few
nanoseconds away in some RAM memory location or they may be several thousand na
noseconds away (milliseconds) on a disk drive. When a core has to stop executing
the thread while it waits to fetch the external data, time is lost. No other th
read can be executed while the waiting thread is scheduled on that core (the thr
ead is given an allotment of time and not kicked out early). This is similar to
a single lane bridge. Only one car can use the bridge at a time. If a driver sto
ps to take a scenic picture, no other car can use the bridge until the driver ge
ts his picture and moves off the bridge. To prevent complete closure of the core
, the CPU has a mechanism to swap an entire thread off of the core if it experie
nces a serious problem (like a car with a breakdown), but that is a very costly
process and is not used if the thread is just waiting for I/O to complete so tha
t it may continue executing. Like the car analogy, forcing a hung thread out of
a core prematurely is like waiting for a tow truck to get the broken down car of
f the bridge. It takes quite a while, but it is still quicker than repairing the
car on the bridge. A multi-threaded core is like a bridge that has a passing la
ne. When the driver on the bridge stops to take a picture, the car behind him ca
n still use the bridge by passing the stopped car using the passing lane. Think
of it as two different pipelines where thread executions are constructed. Still
only one can be scheduled to a core at a time. But if the executing thread is wa
iting to fetch I/O, the other thread can jump in the core and get a little CPU t
ime in while the thread assigned to the core is waiting. This allows what may lo
ok like two cores (two pipelines executing at the same time). BUT IT IS NOT. Sti
ll only one thread at a time can be executed by the core at a time. This just al
lows another thread to execute during the waiting period of the first thread. De
pending upon specific application design, data needs, I/O, etc, multithreading c
an actually decrease performance or may increase performance up to about 40% (si
ted from Intel and Microsoft sources). Intel CPUs support multithreading, but on
ly two threads per CPU. AMD CPUs do not support multithreading and AMD often sit
es Microsoft's recommendations to turn off Hyperthreading on Intel CPUs when run
ning applications like peoplesoft and Exchange.

You might also like