Solved

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

Posted on 2004-09-08
10
393 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

735 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