A Transaction Processing Monitor
Process Structure
UNIX imposes a fixed limit on the number of file descriptors that a process can obtain. Since each link to an application requires one file descriptor, this would be a severe limitation on the number of processes in the system. In order to avoid this limitation, special processes were added to the system to provide extra communication paths. These processes, known as Transaction Message Handlers (TMH) are connected to the TPM with a pipe. A TMH is connected to some number application input pipes (one pipe per application). Each application is connected to exactly one TMH. When the TPM sends a message to an application, it does so by writing it to the TMH input pipe, the TMH then reads the message and writes it to the input pipe of the actual application. Using this scheme, if each TMH has P available pipes, the number of connections available for applications is increased by a factor of P.
There are some situations where it is not possible for an application to be started as a descendant process of the TPM, a prime example being remote processes. In order to support these, another class of system processes exists: the Special Message Handler (SMH). The SMH exists as a descendant of the TPM and communicates with it in the same way as discussed for applications. However, each SMH has a socket that is used to connect with applications that can't be descendants of TPM. The SMH acts as a two-way forwarder --- whatever it reads from the socket, it forwards to the TPM; whatever it reads from the TPM, it writes to the socket.