Infodoc ID |
|
Synopsis |
|
Date |
17115 |
|
FAQ on 64 bit computing |
|
6 Jun 1999 |
Q: What's all the excitement about Solaris 2.7?
A: For the first time, a developer has true 64 bit and 32 bit application
developement and execution environment. Because of dual 64 bit and 32 bit
support, it provides maximum compatibility for existing applications. All
bundled kernal drivers are now MT (Multi Thread) safe. If for any reason,
a developer is calling a 3rd party driver which is not MT-safe, you get a
warning. To provide consistency, 32 bit library works on 64 bit kernal.
Q: You talk about 64 bit kernal and 32 bit kernal. How can we tell what kernal
is running?
A: The command isainfo -kv will let you know whether the os is 64 bit or 32
bit.
The default startup is defined in /platform/sun4u/boot.conf man page.
On systems containing 200MHz or lower UltraSPARC-I processors,
the 32-bit kernel is chosen as the default boot file. On higher end
systems, the 64-bit kernel is selected. See man boot(1M) for details.
Q: Why was it necessary to go to 64 bit operating system?
A: With the rapid decline of memory prices and the databases, applications, web
searching and great scientific research demanding high performance computing,
32 bit memory address space is getting limited. Now with 64-bit address
space
applications can have more of their data in memory and so it will be faster.
Plus, this is a bridge to the future.
Q: Is there any hardware dependence for 64 bit computing?
A: Only machines with an ultra sparc processor can run 64 bit applications.
However, 64 bit development can be done on a sparc machine but it cannot
be tested. There is a command provided called "isainfo -v" which will let
you know whether the hardware supports 64 bit applications.
Q: What are the changes to the libraries to provide 64 bit support?
A: In order to compile or run 64 bit applications, there are special 64 bit
libraries. And as before, the 32 bit applications link with 32 bit
libraries.
The new 64 bit libraries are located in the same path as you would find 32
bit
libraries except for the additional sparcv9 subdirectory before the library
name. For example, the 32 bit libc.so.1 is in /usr/lib and the corresponding
64 bit library is /usr/lib/sparcv9/libc.so.1. More importantly, there are
appoximately 50 new API's to the libraries to give 64 bit support.
Q: Do we need special compilers to build 64 bit apps?
A: The new sparc compilers 5.0 are needed to build 64 bit
binaries for C, C++ and Fortran. The new compilers allow for building 64 bit
binaries on 32 bit machines. The compilers build 32 bit binaries by default
and for 64 bit binaries you must use "-xarch=v9" option. Also, one cannot
mix 32 bit and 64 bit libraries.
Q: How do we specify the library search path for dynamic linking?
A: The linker looks for libraries by default in /usr/lib for 32 bit
applications
and /usr/lib/spracv9 for 64 bit. You can specify alternative search path by
specifying LD_LIBRARY_PATH which is unchanged for 32 bit programs to provide
consistency. There is a new shell environment variable LD_LIBRARY_PATH_64
provided
to specify the paths of 64 bit libraries. One can also specify the run time
path
by using the -R option to the compilers.
Q: Is there a way to avoid the confusion of the different libraries and library
paths an application uses?
A: The developer can use $ORIGIN shell variable which the linker will translate
to the absolute pathname of which library to link with. This allows the
developer
to build into the application the linking of correct version of libraries.
Q: How can I create my own 64 bit shared library?
A: You cannot use 32 bit objects to create a 64 bit shared library. In order to
create 32 bit and 64 bit shared library from your same source code, you need
to recompile the objects for 32 bit and 64 bit. Once you have the 32 bit and
64
bit objects, link them together to create a seperate 32 bit and 64 bit
library.
Q: How can I debug 64 bit applications?
A: Debuggers prior to the new sparc compiler 5.0 are 32 bit debuggers.
Therefore,
in order to debug 64 bit applications you need the 5.0 debuggers. The 64 bit
debugger can debug both 32 bit and 64 bit applications.
Q: I'm ready for 64 bit computing. Is there something I need to know about the
data
model?
A: Yes. Not all data types are converted into 64 bits. Only longs and pointers
are 64 bits. Everything else remains the same. The table below lists the
data
type sizes.
type 32 bit 64 bit
______________________________
Char 8 8
short 16 16
int 32 32
long 32 64
long long 64 64
pointer 32 64
Q: Are there any tools to ensure my existing and new code is clean for 32 bit
and 64 bit computing?
A: Use lint to check your code before compiling to make sure everything is
clean.
There is a special option "-errchk=longptr64" which looks for possible
truncation problems. This will generate warnings whenever there is a data
type
mismatch.
Q: Is there any documentation for 64 bit computing?
A: The online man pages are an excellent source of information. There is also a
new "64 bit Developers Guide" (part# 805-3635) available for purchase.
See Also: Infodoc 18313
Top
Sun Proprietary/Confidential: Internal Use Only
Feedback to SunSolve Team