Page 150 - A Practical Guide from Design Planning to Manufacturing
P. 150
Computer Architecture 123
added features and performance. One example is the extension of vir-
tual addresses to 64 bits. Intel calls this Extended Memory 64-bit
Technology (EM64T), and AMD refers to it as AMD64 Technology. Larger
virtual addresses do not by themselves offer any improvement in per-
formance, but they allow new programs to be written with new capa-
bilities, such as accessing more than 4 GB of data.
Another recent extension allows pages of virtual memory to be marked
as “data only,” preventing them from being accidentally, or perhaps
maliciously, executed as instructions. Intel calls this Execute Disable Bit,
and AMD calls it Enhanced Virus Protection. Some computer viruses are
spread by overflowing data buffers. A program expecting data allocates
a certain amount of memory space for the response. A response that is
far larger than expected may end up writing data in unexpected loca-
tions. Some programs do this accidentally whereas others do it inten-
tionally to allow them to place new instructions in memory. Marking
these areas of memory as “no-execute” prevents this type of attack from
succeeding.
One recent x86 architecture extension that can improve performance
is Intel’s HyperThreading (HT). HT allows more efficient multitask-
ing by allowing one processor to divide its resources to act as two proces-
sors. Technically processors without HT are not capable of running more
than one application at a time. They give the illusion of running multiple
programs by switching between them very quickly. Every 10 to 15 ms
the operating system interrupts the current application and checks to
see if there are other applications waiting. Switching many times a
second between programs gives the illusion that they are running simul-
taneously, but at any particular instant only one program is actually
running.
Dividing the processor’s operation into these time slices dedicated to
different programs causes some inefficiency. If the time slice is very
long, the program currently running may stall and waste the rest of its
time slice, which other programs could have used. Making the time
slice shorter causes more overhead. Each time the processor switches
between tasks, the register values of one program must be saved and
the values of another loaded. With very short time slices, the processor
could end up spending most of its time just switching between tasks,
rather than making any forward progress on the tasks themselves.
HT reduces this wasted time by allowing two programs to run on the
processor at the same instant. The hardware resources are divided
between the two threads, so that one does not have to be stopped for the
other to make progress, but if one thread does come to a halt while
waiting for data or some other dependence, the other thread makes use
of that idle time which before would have been wasted. Both threads
have all their needed register values already on the processor, so there