From: dipirro@star.dec.com (If it doesn't smell like chili, it probably isn't)
Subject: Re: Map Process address space - help!
Date: 7 Nov 89 18:08:09 GMT [thread overview]
Message-ID: <1639@hiatus.dec.com> (raw)
In article <3334@vax1.tcd.ie>, mbrennan@vax1.tcd.ie writes...
>I am implementing a garbage collector in C on a VAX 6230, and need a
>little help.
>
>The garbage collection process is running in parallel with the user process.
>The algorithm requires that the collector process be able to access(read)
>the data segment(s) of the running user process. The reason for this is
>that the collector needs to examine the current value of variables in
>the user process each time it 'sweeps'. A parent/child relationship exists
>between the collector process, and user process.
>
>ONE:
>Any ideas on how I can share(map/access) the relevant pages of the user
>process, with the garbage collector?
>
>TWO:
>I have tried using SYS$CRMPSC (create and map section) to do this but
>without success. However if you have used this call before then perhaps
>you can help.
>
>Thanking you in advance
>
>Micheal Brennan
>Department Computer Science
>Trinity College
>Dublin 2
>Ireland
>
>Voice : +353-1-772941 x1797
>Fax: +353-1-772204
>EMail: mbrennan@cs.tcd.ie
If the processes are "cooperating," you can use a variety of interprocess
communication techniques to transfer information. $CRMPSC is one that also
allows the sharing of virtual address space. You specify a virtual address
range and a section file in the parent. The child can map the section file
into its own virtual address space (anywhere). You need to worry about
synchronizing access to the data.
Another way to share data between two cooperating processes, if you can
set it up this way, is to use a shareable image. The shareable image would
be INSTALLed as shared, used by both parent and child, and contain all
the "shared" data along with any CRF data it needs. So the parent would
call subroutines in the shareable image to manipulate this important data.
The child could call other subroutines in the shareable image to acquire
snapshots of the current contents.
If the processes aren't cooperating, then in order to look in another
process' address space, you have to be running in the process context of that
process. This is usually done via ASTs. You deliver an AST (like a special
kernel mode AST) to the process and execute your code there. In a special
kernel mode AST, you have exclusive access to the data and don't have to
worry about synchronizing with other threads. You can take a snapshot of
the pertinent address space and stash it somewhere. Naturally, all this
requires privileged, inner-mode stuff.
------------
Steve DiPirro dipirro@star.dec.com
--or-- ...!decwrl!star.dec.com!dipirro
--or-- dipirro%star.dec@decwrl.dec.com
------------
next reply other threads:[~1989-11-07 18:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1989-11-07 18:08 If it doesn't smell like chili, it probably isn't [this message]
-- strict thread matches above, loose matches on Subject: below --
1989-11-06 11:10 Map Process address space - help! mbrennan
1989-11-12 18:29 ` Mike Schilling(This sentence no verb.)
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox