HP3000-L Archives

June 1995, Week 5

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bruce Toback <[log in to unmask]>
Reply To:
Bruce Toback <[log in to unmask]>
Date:
Wed, 28 Jun 1995 07:59:26 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (33 lines)
Steve Elmer writes:
>David Groves ([log in to unmask]) wrote:
>: Hello again, one and all!
 
>: need I have is as follows:  I need to have a main process running which
>: will use HPGETPROCPLABEL to enable new code items to execute, and I need
>: to know whether the data objects being handled in the main process will
>: be, or can be made to be, accessible by the new process.
 
>If you want the first and second process to share the same data items without
>copying, then you want either SVIPC shared memory segments or mapped files.
>With SVIPC shared memory, chunks of SR6/7 space are allocated to a process
>and then shared with other processes.  Mapped files can be used in a similar
>fashion, the coding is probably equally annoying in both cases.  Be sure to
>include some semaphore mechanism, SVIPC provides one.
 
We have been using mapped files in this fashion for many years, most
recently in an application that will have 100+ processes accessing the
same memory space. The mapped file approach provides "automatic"
persistence of shared objects, which is handy if you were going to
implement some kind of save/restore code anyway.
 
A crude semaphore is already provided: open the
file with ;LOCK and use FLOCK/FUNLOCK. If you need finer granularity,
you'll have to come up with your own. We've used the local RIN mechanism
in various ways depending on the required granularity. Email or call
if you need more detail.
 
-- Bruce Toback
OPT, Inc.
[log in to unmask]
(800) 858-4507

ATOM RSS1 RSS2