[comp.unix.questions] Process Mapping

bajohnso@bbn.com (Bruce Johnson) (09/28/90)

Hi,

I am developing code on a Sun workstation SunOS 4.03.  I am trying to
provide an emulation of a target system that will run on a Sun. 
Consequently, I do not wish to modify the base code.

I have two Unix processes.

Process 1 mallocs some memory space.  Then process 1 communicates this
location to process 2.  Process 2 will then copy some data into process
1 memory space.

To accomplish this action I believe that I need the ability to map
process 1's memory map into process 2 and vice versa.  This could be
something like:


PROCESS 1			PROCESS 2
=========			=========
00000000			00000000
   .				   .
   .				   .
   .				   .
Process 1's space		Process 2's space


00300000			00500000

01000000			01000000
   .				   .
   .				   .
   .				   .
Process 2's space		Process 1's space

01500000			01300000

Constraints


1.  I cannot use shared memory (shmget...etc), because I would like the
whole process to be mapped and it implies I would have to change the
target code.

2.  I am using lightweight processes to provide tasking within each
process and I cannot use them to provide this capability.  Also, I would
like to build the original processes with a separate link.

I don't believe that the SunOS supports such a concept, but I also do
not believe it is impossible to accomplish.

Has anyone any experience with this idea?

Thanks,

bajohnso@bbn.com (Bruce Johnson) (09/28/90)

Hi,

Sorry if this is a repeat ... I am trying to get this posted by the
MODERATOR.  I assume that I do it by sending to info-unix@sem.brl.mil?

I am developing code on a Sun workstation SunOS 4.03.  I am trying to
provide an emulation of a target system that will run on a Sun. 
Consequently, I do not wish to modify the base code.

I have two Unix processes.

Process 1 mallocs some memory space.  Then process 1 communicates this
location to process 2.  Process 2 will then copy some data into process
1 memory space.

To accomplish this action I believe that I need the ability to map
process 1's memory map into process 2 and vice versa.  This could be
something like:


PROCESS 1			PROCESS 2
=========			=========
00000000			00000000
   .				   .
   .				   .
   .				   .
Process 1's space		Process 2's space


00300000			00500000

01000000			01000000
   .				   .
   .				   .
   .				   .
Process 2's space		Process 1's space

01500000			01300000

Constraints


1.  I cannot use shared memory (shmget...etc), because I would like the
whole process to be mapped and it implies I would have to change the
target code.

2.  I am using lightweight processes to provide tasking within each
process and I cannot use them to provide this capability.  Also, I would
like to build the original processes with a separate link.

I don't believe that the SunOS supports such a concept, but I also do
not believe it is impossible to accomplish.

Has anyone any experience with this idea?

Thanks,