3.8 Communication realization
-
int oldval = pvm_setopt (int what, int val)
call pvmfsetopt (what, val, oldval)
-
Sets options of the PVM system
what = PvmRoute
advises PVM to set up direct task-to-task
links for all subsequent communications or not
- By default, PVM routes messages via daemons (UDP
protocol)
- Direct task-to-task communication are possible (using
TCP)
val
specifies one of
-
PvmDontRoute
- Doesn't allow direct links to
this task
- PvmAllowDirect
- Allows but doesn't
requests direct links (It is the default)
- PvmRouteDirect
- Requests direct links
|
Route |
Dont |
Allow |
Route |
direct |
--- |
direct |
Dont |
--- |
--- |
--- |
Allow |
direct |
--- |
--- |
-
-
Once a direct route established between tasks, both
will use the route
- Once a link is established, it remains until the
application finishes
- If a link can not be established
-
Because one of the two tasks has requested
PvmDontRoute
- Or because no resources are available
The default route though the PVM daemons is used
pvm_setopt (PvmRoute...)
can be called multiple times to
selectively establish direct links
- But it is typically set only once near the beginning
of each task
- Performance of direct task-to-task is better
- Draw backs are
-
Lack of scalability
- Startup time