Solved

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

Posted on 2004-09-08
10
389 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
  • 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

895 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now