[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Confused about 64bit



On Tue, Jun 21, 2005 at 10:50:46AM +0100, Graham Smith wrote:
> Hi, I'm confused and I hope that you can help me out.
> 
> I'm running the pure64 port of Debian on an AMD64.
> 
> My understanding about the AMD64 was that is could run in three modes:
> 
> 1)32 bit emulation mode where you are using a 32bit kernel and 32 bit 
> libraries (eg WinXP).

It's not really emulation, just that the athlon64 is an x86 chip and
runs x86 instructions natively.  It has a new 64bit mode too that the os
can switch it into, in which case it is a 64bit chip.  Until you switch
it to that mode, it is the same as an old athlon xp for running code,
except a very fast one.

> 2)mixed mode with a 64 bit kernel and 32 bit libraries (eg "Normal" 
> Debian with 64 bit kernel)

I run that mode, with a few 64bit chroot's for playing with 64bit
programs.

> 3)full 64 bit mode (64bit Debian port)

I tried that initially while testing the new machine about 2 months ago
and it worked pretty good.  Doing a 32bit chroot for the oddball package
wasn't bad either.

> I thought that in full 64 bit mode it was impossible to run 32 bit 
> applications unless the 32 bit libraries had been tweaked to allow it. 
> But, and here's the strange bit, I am running the 32 bit Sun Java VM 
> under the 64 bit environment quite happily without the ia32-libs package 
> installed. How come this works? Surely the VM is compiled against 32 bit 
> libraries and therefore shouldn't work when running against the 64 bit 
> ones? That of course then raises the question why don't other 32 bit 
> applications like OO work under 64 bit?

No lib tweaking required.  The kernel has 32bit emulation of the
required system calls so it can run both 64 and 32bit code at once as
long as the 32bit libs required by the program are found since the 32bit
program knows nothing about 64bit libs of course.  You just need both a
32 and 64bit version of any lib you use for a given application.  Well
you actually only need the version matching the application's type (32
or 64bit).

> I suspect there is a hole in my knowledge but I don't know where. A 
> quick lesson would be appreciated. Many thanks,

Hope that clears it up a bit.

Len Sorensen



Reply to: