Shared Memory

Eli Liang liang at cvl.UUCP
Mon Apr 15 12:58:51 AEST 1985


.....
I am posting this for a friend, whose Vax hasn't come in yet... :-)

> > > 	How do you pass a key from one process to
> > > another process so that both processes have acess to the
> > > same "shmid"?
> > 
> > Message passing?
>
> The "proper" way to do this is to use the ftok() (stdipc(3C)) routine
> with a filename that all processes involved agree upon.  Yes, it is
> difficult to find this routine (due to the name of the manual entry
> and the contents of the NAME section, it doesn't appear anywhere
> useful in the permuted index), but that's how to do it.  Honest --
> I've used it!
> -- 
>	Marty Shannon

	I am writing a multi-processing version of lisp in which one
lisp process can ask another to evaluate an s-expression for the first.
In order to keep things working properly, each of these `remote evaluations'
should be it's own process (what's important is that it has it's own
stack area, I'm willing to do my own process scheduling, but would rather
not...), but they must share a single program segment (no problem) and
a single data segment (problem).  The above article from mod.unix seems
to be about what I'm trying to do, but I have been unable to find ANY
references in our on-line documentation to ftok() or sdtipc...  Are they
for 4.2BSC, or Sys V, or what?  We're running 4.2, but I will also need
to get this running on Dec ULTRIX (a carbon copy of 4.2, or so I'm told...)
in the near future.  vfork() seems to do part of what I want, but I cannot
allow the parent process to be blocked for the duration of the child's
execution.  I would appreciate any ideas on the subject, or info about
the above commands (how to get the doc would be sufficient),
and will post summaries of any interesting suggestions I recieve.
Thanks for the help....

		Eric Messick

reply by mail to:   {seismo, allegra, brl-bmp}!umcp-cs!cvl!liang

------------------
any opinions expressed above do not literally exist within this universe.....

-- 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Eli Liang  ---
        University of Maryland Computer Vision Lab, (301) 454-4526
        ARPA: liang at cvl, liang at lemuria, eli at mit-mc, eli at mit-prep
        CSNET: liang at cvl  UUCP: {seismo,allegra,brl-bmd}!umcp-cs!cvl!liang



More information about the Comp.unix mailing list