SUMMARY: Running 32 bits apps on 64 bits kernel

From: DAUBIGNE Sebastien - BOR ( SDaubigne_at_bordeaux-bersol.sema.slb.com ) <SDaubigne_at_bordeaux-bersol.sema.slb.com>
Date: Fri Mar 07 2003 - 07:58:48 EST
Thanks to Darren Dunham, Rich Teer, Greg, Casper Dik, G S Babu.

To quote various answers :

Libs: 64 bits apps are just linked with their own set of libs, as 32 bits
one do, based on the ELF header. The 32-bit and 64-bit interfaces use a
different trap. The 32-bit and 64-bit versions of libraries are stored in
different directories since the names of the libraries remain the same. The
selectionis made by calling elf_getident(3E), or something to the same
effect.  Note also that executables have the path of the appropriate ld.so
embedded in them.

Performance : There is no need to compile specific 64 bits tools, unless it
makes use of some features specific to 64 bit binaries (native 64 bit
arithmetic, Larger VM space, access to kernel structures when kernel is 64
bits). In some cases, a 64 bit program will actually run slower.  If you do
much moving of memory pointers, you will be moving more data (since the
pointers are twice as large).  This can be enough to keep a loop from
fitting in the CPU cache. 32-bit system calls may have a very small amount
of code to deal with the different layout of various data structures.
Otherwise the code paths are mostly common. The userland component of 32-bit
apps tend to be slightly faster due to smaller cache footprints so it
averages The main issue is that the kernel will require more memory for
itself and its internal tables. Everything else (paging, cache usage, etc.)
follows from that. It's a trade-off; on older machines with less memory and
smaller caches, you should probably stick to 32-bit kernels. On newer
hardware, on the other hand, the 32-bit kernel may not even work. (Most
likely in UltraSPARC III-based systems: the Fire and Blade series.). Every
32-bit executable I've seen ran equally well on a 64-bit kernel and on a
32-bit kernel. I routinely build 32-bit apps (they are adequate for most
uses) and run the same executables on both 32-bit Ultra 1's and faster
64-bit Ultras.

Solaris tools : Most are 32 bits, with some specific 64 bits to be able to
query kernel structures (like 'ps' and 'truss').The 64-bit apps live in
/usr/[s]bin/sparcv9.

Compatibility : There are no compatability issues for the majority of
applications.  The remainder fall primarily into the categories of debuggers
and kmem readers.  If an application accesses kernel data structures
directly (via /dev/kmem, libkvm) or is a debugger (via /proc) of 64-bit
programs then it needs to be compiled as a 64-bit program. By keeping a
predominantly 32-bit userland one Solaris distribution works for both 32-bit
and 64-bit.  This also underscores the 32-bit backwards compatability story.

Docs : docs.sun.com has whitepapers on 64-bit migration issues:
http://docs.sun.com/?q=64-bit <http://docs.sun.com/?q=64-bit>
http://docs.sun.com/db/doc/806-6543 <http://docs.sun.com/db/doc/806-6543>
http://wwws.sun.com/software/solaris/faqs/64bit.html
<http://wwws.sun.com/software/solaris/faqs/64bit.html>

---
Sebastien DAUBIGNE
sdaubigne@bordeaux-bersol.sema.slb.com
<mailto:sdaubigne@bordeaux-bersol.sema.slb.com>  - (+33)5.57.26.56.36
SchlumbergerSema - SGS/DWH/Pessac

	-----Message d'origine-----
	De:	DAUBIGNE Sebastien  - BOR (
SDaubigne@bordeaux-bersol.sema.slb.com )
[SMTP:SDaubigne@bordeaux-bersol.sema.slb.com]
	Date:	mardi 4 mars 2003 16:42
	@:	sunhelp@sunhelp.org; sunmanagers@sunmanagers.org
	Objet:	[SunHELP] Running 32 bits apps on 64 bits kernel

	Could someone explain or give links to good docs about  32 bits apps
running
	on 64 bits kernel ?

	Are there any "compatibility" libs involved in the process ? How
does the
	lib loader select 32/64 bits libs ?
	What are the performance issues for 32 bits apps on 64 bits kernel
compared
	to 32 bits kernel ?

	Could I take every 32 bits app and make it run on 64 bits kernel, or
are
	there compatibility issue ?

	Are usual Solaris tools (in /usr/bin and co.) compiled as 64 bits
ELF when
	the 64 bits OS is installed, or only kernel+drivers ?

	Thanks for help, I will summarize.

	---
	Sebastien DAUBIGNE
	sdaubigne@bordeaux-bersol.sema.slb.com
	<mailto:sdaubigne@bordeaux-bersol.sema.slb.com>  -
(+33)5.57.26.56.36
	SchlumbergerSema - SGS/DWH/Pessac
	_______________________________________________
	SunHELP maillist  -  SunHELP@sunhelp.org
	http://www.sunhelp.org/mailman/listinfo/sunhelp
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Fri Mar 7 08:02:04 2003

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:04 EST