PSRP Notes


Home Introduction Successes Examples Download Install Documentation Discussion Acknowledgments


PSRP: Peer-to-peer process communication

One of the most important aspects of the PUPS/P3 system is peer-to-peer communication between processes (which may be running on different hosts) which do not have any specific relationship (e.g. parent/child). This peer-to-peer communication is mediated by PSRP [Process Status Request Protocol]. Any PUPS/P3 process which is linked with the appropriate library may act as a PSRP server, which may be queried by processes such as psrp which implement the client side of the PSRP protocol.

PSRP client/server interaction can be either simple requests for information, for example the client can query the server to find out about:

  1. How many files it has open (and whether or not they are homeostatically protected
  2. How many signal handlers it has installed (and the function of each signal handler)
  3. The number and disposition of the servers shared memory segments
  4. Who owns the server
  5. The number of client processes currently connected to the server



Showing an instance of psrp communicating with a PSRP server (embryo) running in an xterm terminal emulator window

In addition to these builtin commands, the user who owns the PSRP server may also extend the functionality of the server. There are two methods of doing this

Static PSRP functions

These are functions which are hardwired into the server processes PSRP dispatch table when the server application is compiled.

Dynamic PSRP functions

These are dynamic (shared) objects which are attached to the running PSRP server via the POSIX dl interface. The interfaces for these objects are subject to dynamic strong type checking and may be defined either using a small C function call library or alternatively using an extended dialect of C called Dynamic C [D].

In addition to functions, the PSRP protocol permits objects of other types to be added dynamically to running server processes including:

  1. Databags

    Binary files which are mapped into the PSRP server address space.

  2. Shared Heaps

    which are pesistent objects which may be shared between multiple processes running on different hosts. Shared heaps use a modified API based on malloc and use memory mapping in conjuction with a network file system to share pages of memory between processes which may be located anywhere on The Internet relative to one another.


PUPS/P3 (c) Mark A. O'Neill 2007