Operating System - HP-UX
1833875 Members
1671 Online
110063 Solutions
New Discussion

Question about Virtual Address Process Space

 
SOLVED
Go to solution
Wang,MinJie
Super Advisor

Question about Virtual Address Process Space

Hi all
As we all know
One process space is devided into four quadrants
on PA-Risc system.
The first quadrant is reserved to hold text for 32-bit process while it is reserved to hold Shared Objects for 64-bit.The order of using four quandrants is different.
Can you tell me why?
Thanks
4 REPLIES 4
Wang,MinJie
Super Advisor

Re: Question about Virtual Address Process Space

Let me make it clear
32-bit process
Quadrant 1:text
Quadrant 2:data
Quadrant 3:Share
Quadrant 4:Share

64-bit process
Quadrant 1:Share
Quadrant 2:text
Quadrant 3:data
Quadrant 4:Share
I want to know why it's changed?
Dennis Handly
Acclaimed Contributor
Solution

Re: Question about Virtual Address Process Space

It may be related to putting all of the 32 bit pointers into the first quadrant?
This may help the kernel when it is running a 32 bit application.

Figure 5-4 on the Tru64 Porting Guide indicates it is for 32 bit mmaps:
http://h30097.www3.hp.com/docs/porting/tru64-to-hpux/CHPLNKRX.HTM#fig-hpuxpa-64addrspace

(The program stack is really in quadrant 3 for that figure.)

>I want to know why it's changed?

Why does it matter to you?
Don Morris_1
Honored Contributor

Re: Question about Virtual Address Process Space

Very simple -- because otherwise, how would you ever share anything between 32-bit and 64-bit processes if you don't?

Think about it -- PA doesn't allow aliasing, which is why HP-UX historically was a Global Address Space OS (unlike a lot of other Unix/Linux models which had Private Address spaces or Mostly Private). Sharing between processes is done using a single global shared address across all processes (i.e. if object A is in processes B, C and D -- they all use the same GVA (space.offset) for A). As such -- if you want to share anything in the 32-bit shared address space (q3/q4 in the 32-bit model) you _must_ use the 3 to 4Gb range of q1 of the 64-bit model. Since it would be rather silly to put Text there but sidestep the shared area, you just move Text to a different quadrant and make q1 shared for 64-bit in general.

QED.
Wang,MinJie
Super Advisor

Re: Question about Virtual Address Process Space

Thank you
I think I get it