* Map Process address space - help!
@ 1989-11-06 11:10 mbrennan
1989-11-12 18:29 ` Mike Schilling(This sentence no verb.)
0 siblings, 1 reply; 3+ messages in thread
From: mbrennan @ 1989-11-06 11:10 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Map Process address space - help!
@ 1989-11-07 18:08 If it doesn't smell like chili, it probably isn't
0 siblings, 0 replies; 3+ messages in thread
From: If it doesn't smell like chili, it probably isn't @ 1989-11-07 18:08 UTC (permalink / 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
------------
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Map Process address space - help!
1989-11-06 11:10 mbrennan
@ 1989-11-12 18:29 ` Mike Schilling(This sentence no verb.)
0 siblings, 0 replies; 3+ messages in thread
From: Mike Schilling(This sentence no verb.) @ 1989-11-12 18:29 UTC (permalink / raw)
From article <3334@vax1.tcd.ie>, by mbrennan@vax1.tcd.ie:
> 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.
>
Does the garbage collector have to run in a separate process? running it as a
timer-driver AST has the following advantages:
1. You map the "parent"'s complete address space with no additional work.
2. You can block the garbage collector around critical sections easily,
with the SYS$SETAST service.
3. Assuming the garbage collector is compute-bound, you don't lose
any parallelism, at least on a single-processor machine.
4. You don't have to pay the full context-switch penalty every time the
garbage-collector runs.
----------------------------------------------------------------------------
Any resemblance between the opinions expressed above and those of any living
person is a coincidence.
----------------------------------------------------------------------------
Mike Schilling mikes@rtech.com
Relational Technology
Alameda, CA
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1989-11-12 18:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1989-11-07 18:08 Map Process address space - help! If it doesn't smell like chili, it probably isn't
-- strict thread matches above, loose matches on Subject: below --
1989-11-06 11:10 mbrennan
1989-11-12 18:29 ` Mike Schilling(This sentence no verb.)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox