ITLB,Branch Prediction and Hyperthreading
ITLB,Branch Prediction and Hyperthreading
The IA-32 Instruction TLB and front-end BTB, shown at the top of Figure 2, steer the front end when
the machine misses the Trace Cache. The ITLB translates the linear instruction pointer addresses given
to it into physical addresses needed to access the L2 cache. The ITLB also
performs page-level protection checking.
P4 uses both static and dynamic branch prediction techniques to prevent mis predicts and delays.
If a branch instruction does not have an entry in the BHT, both processors will use static prediction to
decide which path to take. If the instruction does have a BHT entry, dynamic prediction is used.
The P4's BHT is quite large; at 4K entries, it has enough space to store information on most of the
branches in an average program.
The PIII's branch predictor has a success rate of around 91%, and the P4 allegedly uses an even more
advanced algorithm to predict branches so it should perform even better. The P4 also uses a BTB to
store predicted branch targets. In most of Intel's literature and diagrams, the BTB and BHT are
combined under the label "the front-end BTB."
One of the biggest reasons that around 65% of your CPU's execution resources remain idle is because of
the fact that the CPU can only execute one thread of instructions at a time. Think of a thread as a
collection of instructions related to a single program, for example running spell check in Word would
send a thread of instructions to the CPU to begin checking your document for spelling errors. It turns out
that the instructions within a particular thread mostly use the same execution units over and over again,
leaving the remaining units idle. The idea behind Hyper-Threading is to send multiple threads to the
CPU with the hopes that the idle execution units will be used by different threads. Intel claims that with
HT enabled the utilization of the Pentium 4's execution units can jump to around 50%, not a bad
improvement for such a small modification to the core.