1PVM_SHMD(1PVM)                  PVM Version 3.4                 PVM_SHMD(1PVM)
2
3
4

NAME

6       pvm_shmd - PVM shared memory (2) daemon
7

SYNOPSIS

9       pvm_shmd [ -options ] [ hostfile ]
10

DESCRIPTION

12       Pvm_shmd  is  a daemon process which maintains and handles the usage of
13       shared memory resources (memory segments, semaphores,  message  queues)
14       on a particular PVM host.  One pvm_shmd must run on each host in a vir‐
15       tual machine that wants to use the shmd shared memory  message  passing
16       layer.  The shmd message passing layer allows local processes to a host
17       to use shared memory for message passing on that  host  ONLY.  See  the
18       shmd directory README for further notes and restrictions.
19
20       The  daemon  can  be started manually as with any other PVM task.  Only
21       one pvm_shmd can be active per host. If the  pvm_shmd  detects  another
22       pvm_shmd it will shutdown.
23
24       The pvm_shmd can be killed from the PVM console by using the reset com‐
25       mand.  Local and remote pvm_shmds can also be started from the PVM con‐
26       sole program pvm.
27
28       The name of the daemon executable is pvm_shmd.
29
30

Shared Resource Usage

32       The  pvm_shmd will attempt to create upto MAXSEG shared memory segments
33       of upto MAXPAGES memory pages in size. The size of each memory page  is
34       architecture  dependent(see  getpagesize(3C)).   The  segments are then
35       numbered 0..N-1 where N is the number of segments created.   The  first
36       segement  (0)  has  the  shared  memory control structure placed in its
37       head. This structure allows alien processes to located the other shared
38       memory segments and any required controlling information.
39
40       The  message  passing layer, allocates memory from these segments asyn‐
41       chronously without any interaction with the pvm_shmd  using  semaphores
42       to  protect data during updates to any associated structures.  For each
43       segment there is an associated page map of which  processes  have  cur‐
44       rently  locked a page. Each page map for a segment has a separate sema‐
45       phore protecting it. The semaphores are accessed with the SEM_UNDO flag
46       set  so  that  if  a  process  holding  a  semaphore should die, the OS
47       (should) reset the semaphore automatically,  thus  allowing  any  wait‐
48       ing/blocked processes to continue.
49
50       The  pvm_shmd  only  maintains  the  segments and their allocation page
51       map(s).  Thus if a process allocated pages in a segment and then exits,
52       it  is  the  pvm_shmd  that  detects  this and then frees the allocated
53       pages.
54
55       The pvm_shmd can have its status checked  at  any  time  by  using  the
56       pvm_shmd_stat  process  to  kick it into reporting onto either stdio or
57       the pvm log file (pvml.uid) its internal state.
58
59       The shared memory and all associated processes can be cleared by  send‐
60       ing the pvm_shmd a HUP signal.
61
62       Sending  the  pvm_shmd  a  TERM  signal will just cause it to clear any
63       shared resources and then exit.
64
65       The pvm_shmd cannot catch the KILL signal.
66
67       If the pvm_shmd is killed without clearing all of its shared  resources
68       these  can  be cleared by calling ipcfree which resides in the pvm3/lib
69       directory.
70

Message Passing using SHMD

72       The pvm_shmd handles resources that are used  by  special  versions  of
73       pvm_psend() and pvm_precv() stored in the libpvmshmd.a library. Thus to
74       use these facilities, applications have to link to this library instead
75       of the usual libpvm3.a library.
76

OPTIONS

78       The  following options may be specified on the command line when start‐
79       ing the pvm_shmd:
80
81       -debug=level
82               Sets the pvm_shmd debug level.  Used to debug the  pvm_shmd  or
83               libpvmshmd  (not  intended to be used to debug application pro‐
84               grams).
85
86       -maxsegs=maxsegs
87               Sets the maximum number of segments that the pvm_shmd can  cre‐
88               ate.  This  is  used  to  over-ride  the compiled in value from
89               shmd.h. Note that the value cannot be above the MAXSEGS in  the
90               shmd.h file.
91
92       -maxpages=maxpages
93               Sets the maximum segment size to maxpages pages of memory. This
94               value cannot be above the compiled value MAXPAGES in shmd.h  or
95               the actual OS defined limit.
96
97

NOTES

99       Remember  that  pvm_shmd  allocated memory from the VM available on the
100       machine. Allocating more segements improves  performance  as  there  is
101       less sharing of segments (semaphores for their page maps). Although you
102       must remember to leave some memory available for normal program and  OS
103       system  usage, as the pvm_shmd allocated memory is *ONLY* used for mes‐
104       sage passing.
105

FILES

107         $PVM_ROOT/lib/$PVM_ARCH/pvm_shmd PVM shared memory daemon executable
108         $PVM_ROOT/shmd/shmd.h Shared Memory hard limits header file
109         /tmp/pvml.uid Pvmd runtime error log
110
111

SEE ALSO

113       pvm(1PVM), pvmd(1PVM), getpagesize(3C), ipcs(1), msgctl(2),  semctl(2),
114       shmctl(2), signal(5)
115
116
117
118
119G.E.Fagg                        11 March, 1999                  PVM_SHMD(1PVM)
Impressum