Linux fat/bloated

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Fri Apr 7 18:12:27 UTC 2006


On Fri, Apr 07, 2006 at 01:52:20PM -0400, wattst-dxuVLtCph9gsA/PxXw9srA at public.gmane.org wrote:
> This is getting un-linux related, but I've never known what i386/486/etc. refers
> to and how you tell the difference.  I know that x86 simply refers to the Intel
> architecture, but the numbers 3 to 6 are what I don't know.  Like, does Pentium
> II or III correspond to one of those numbers?

i386 was the intel 80386 processor's instruction set.  For the most part
intel has been good at maintaining compabitility with older chips when
they release a new one.  New chips might not run optimally with code
optimized for an older chip, but they will run the code at least.

The intel 80486 added a few instructions which were found to be useful
to what the 386 offered, some of which make some common operations much
simpler and faster to implement.  This is why glibc decided to use them
at the expense of 386 support.  The 486 also had a pipeline, and code
tends to be optimized for that when you compile for a 486, while the 386
simply did one instruction at a time, and didn't start another one until
done the prior one.  486 code runs quite well on newer chips, since they
all have pipelines, and most of the added instructions are for special
purposes.

i586 tends to refer to the pentium (P5) generation of chips.  I don't
remember if the k6 is considered i586 or i686 level of instructions, but
nexgen, cyrix M* and a few others were using this instruction set.

i686 is the instruction set of the P6 generation, which is the Pentium
Pro, Pentium II, Pentium !!!, and Pentium 4, as well as the Athlon
processors (also sometimes called k7).  Different cpus added more new
instructions (the P3 added a new mode as well to handle the registers
added by SSE).  Code that uses new instructions needs that level of cpu,
while code can be optimized fairly well for most of them in the same
way.  The Pentium 4 is probably the most different of all of them, due
to having a much much longer pipeline that normal and relying much more
on the new instructions for peak performance.

amd64 (x86_64) is the instruction set of the Opteron/Athlon 64 series of
chips, which takes the instruction set of the i686 and adds new 64bit
instructions, and yet another mode of operation (the long mode for
64bit).  Intel cpus support these extensions if they have em64t support.

Of the 32bit architectures, the 386 to 486 transition probably had the
most to gain due to some very key added instructions.  Most of the later
ones (before 64bit) were only adding instructions for multimedia and
vector processing, which often requires writing the assembly manually
for the key parts to use it.  Some programs even look at the cpu
features and pick a code path that supports the optimal instruction set
for that cpu (mplayer for example).  If you optimize for a specific
generation, other generations will probably run slightly less
efficiently, while if you compile for a specific instruction set, older
generations can't run the code at all.  gcc has options both for
optimization (alignment and instruction ordering) and for instruction
set choice (which instructions are allowed to be used).

Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list