Next: MSP Messages
Up: Implementation
Previous: MSP, Sockets and Queues
MSP communications are opened between tasks by name.
The name lookup is provided by
each task making an entry in a directory pointed to by the environment
variable ADAM_USER. If ADAM_USER is not defined when a task
attempts to register itself with the message system, directory ~/adam
will be used and, if the specified directory does not exist, an attempt will
be made to create it.
This results in a file being created in the ADAM_USER directory
with a name compounded of the task name and an identifying number
(e.g $ADAM_USER/slave_5001).
Another task can then open communications by searching ADAM_USER for
the right name and using the identifying number.
When a task exits, the AMS exit handler de-registers the task from MSP and
the task's file is removed from ADAM_USER.
If the task does not exit normally for some reason, the file in
ADAM_USER may get left behind.
In this case the file must be deleted explicitly; otherwise the
task will refuse to load next time.
Next: MSP Messages
Up: Implementation
Previous: MSP, Sockets and Queues
AMS The Unix ADAM Message System
Starlink User Note 241
B D Kelly (ROE)
A J Chipperfield (RAL)
16 August 2001
E-mail:ussc@star.rl.ac.uk
Copyright
© 2000 Council for the Central Laboratory of the Research Councils