Solved

2.8: Mode switch v8 <-> v9 possible in process?

Posted on 2004-09-08
10
395 Views
Last Modified: 2013-12-27
Is it possible with Solaris 2.8 to switch between V8 (32bit) and V9 (64 bit) mode within the same process?

I'm aware of some different features (stack bias, etc.), but the V9 ABI doesn't tell anything about how a V8<->V9 switch is done. It must be done in the kernel somewhere, since it's possible to run both V8/ELF32 and V9/ELF64 binaries.

Background: We're having lots of V8 applications here and slowly some of them are running out of mappable shared memory (2GB). It would be nice to have the shared memory routines running in 64 bits (with -xcode=abs32).

Porting all to 64 bits is not an option, since this would require a huge regression testing effort.

(Yes, I know this is a tough one ... )
0
Comment
Question by:stefan73
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
10 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 12012112
Seems to me that you should just start up the system in 64bit (V9) mode and convert just the apps that are having problems to 64bit. The 32bit apps should continue to run.
0
 
LVL 38

Expert Comment

by:yuzh
ID: 12012255
I agreed with jlevie's comments. Just add a bit more information. Solaris 8/9 (Sparc) are
64 bit OS, it can run in 64 bit mode only if the hardware (CPU) can support, the old Sparc
CPU can only run in 32-bit mode, most of the Ultra Spac CPU (with latest OBP) can support
64 bit, Ultra Sparc-II or new support 64 bit.

If you want to build 64 bit binary, you need to it in the box can run in 64 bit mode.

0
 
LVL 12

Author Comment

by:stefan73
ID: 12013838
jlevie, yuzh,

Thanks for your comments. Yes, the box is a 64 bit Solaris 2.8. And yes, it might be possible to build the apps in 64bits. The problem is just that those apps are using a common, quite monolithic framework of functions (it's a big billing system in a telco environment), whereas the shmem part is pretty much stand-alone.

Porting the existing libraries of functions to 64bit is not an option, as the effort would be quite similar to porting the entire system, in other words: huge. Can't do that.

There are a couple of options to have more than 2GB of shared memory, all of which don't quite convince me:

- a separate V9 process mapping the shmem, using RPC or IPC to communicate with the rest. The overhead is quite big.

- On-demand mapping of various blocks in a V8 process. Quite slow, and big index structures won't work.

Ideas, anyone?
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 40

Expert Comment

by:jlevie
ID: 12018657
I guess I don't understand "whereas the shmem part is pretty much stand-alone." Is that or is that not an integral part of the "monolithic framework of functions"?

If the part using shmem is stand-alone it would seem that it could be modified to build & run in 64bit mode. However, it that is linked into the mail application that wouldn't be possible and you'd have to an approach like you've outlined.
0
 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 250 total points
ID: 12024120
I would suggest you to try to port the programs which need to use large file (>2GB) and
large amount of memory to 64-bit, and leave the other unchange.
see "Solaris 64-bit Developer's Guide"
http://docs.sun.com/db/doc/806-6543/6jffrdmfd?a=view

You can also try to use "limit" to change the datasize and memorysize, and then start
the 32 bit binay to see if it can help:

Please read: 32-bit binary "4GB Processes in Solaris":
http://www.mpi-sb.mpg.de/~jh/Solaris4GB.html

man limit
to learn more details
0
 
LVL 12

Author Comment

by:stefan73
ID: 12158709
Just returning from a vacation...

jlevie,
> I guess I don't understand "whereas the shmem part is pretty much
> stand-alone." Is that or is that not an integral part of the "monolithic
> framework of functions"?

That wasn't explained clearly enough. The shmem part is modular, the rest is monolithic - just like lots of existing bigger systems. Yes, it's not pretty.

yuzh,

the limit part was quite interesting.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 250 total points
ID: 12162499
> The shmem part is modular, the rest is monolithic

In that case it might be feasible to modify the application so as to allow the shmem part to be built for 64bit.
0
 
LVL 12

Author Comment

by:stefan73
ID: 12274609
OK, although I didn't get the answers I wanted, I'll close regularly.

(BTW: Friend of mine working at Sun said it's impossible - except with the help of a driver)
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question