LWN.net Logo

Gave it a shot

Gave it a shot

Posted May 6, 2008 21:42 UTC (Tue) by k3ninho (subscriber, #50375)
In reply to: Gave it a shot by evgeny
Parent article: OpenSolaris 2008.05 released

The sole comment in the FAQ is that it's for both.  I've not seen any details as to how it
knows what to do.  Sun don't say what would happen if you have an AMD64 chip and want to run
i386...

k3n.


(Log in to post comments)

Gave it a shot

Posted May 8, 2008 3:23 UTC (Thu) by mgerdts (guest, #27726) [Link]

When Solaris added 64-bit support (Solaris 7 - around 1997), they did so by making it so that
a 32-bit and a 64-bit kernel + modules exist.  If the system is booted using the 32-bit
kernel, it can use only 32-bit executables.  If booted with the 64-bit kernel, it can run
32-bit or or 64-bit executables.

Traditionally 32-bit executables and libraries have had a performance edge over 64-bit
presumably because the 64-bit processors of 5 - 10 years ago were optimized for the more
common 32-bit case.  As such, nearly all of the executables on Solaris are 32-bit.  In
circumstances where an executable will benefit from being 64-bit, Solaris tends to include a
32-bit and a 64-bit variant.  This tends to be things that may need to deal with data
structures passed from the kernel (e.g. ps uses /proc/<pid>/* which are data structures) and
as such a 32-bit or 64-bit variant is chosen at runtime based upon which kernel is booted.
Google isaexec if you are interested.

Beginning with Solaris 10, the 32-bit kernel was dropped from SPARC but userland is still
mostly 32-bit.  On x86 both 32-bit and 64-bit kernels are available.  OpenSolaris is the next
step after Solaris 10 and has the same characteristics as Solaris 10 in this regard, with the
exception that the 2008.05 release only supports x86 (32-bit and 64-bit).  SPARC support is
coming, but for now you need to use Solaris Express to run the SunOS 5.11 kernel and userland.

The isainfo command will tell you information about whether the running kernel is 32-bit or
64-bit and whether the system can support 32-bit and/or 64-bit executables.  The file command
will tell you whether an executable is 32-bit or 64-bit.  If you look closely in /usr/bin, you
will see that there are several files that are hard links and are actually wrappers that call
the isaexec() function to run the command from the architecture-specific subdirectory of
/usr/bin.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds