A connection to a server is a bidirectional communication path from the client to the server. A server's file tree is attached to a process group's name space by bind and mount calls. Processes in the group are then clients of the servers: system calls operating on files are translated into requests and responses transmitted on the connection to the appropriate service.
A client transmits requests (T-messages ) to a server, which subsequently returns replies (R-messages ) to the client. The combined acts of transmitting (receiving) a request of a particular type, and receiving (transmitting) its reply is called a transaction of that type.
The Styx protocol contains messages that perform:
Most programs do not see the Styx protocol directly, rather they make calls to library routines that access files. Their requests are translated by the mount driver, mnt, into Styx messages. Client application programs need not explicitly manage details of the Styx protocol as described in this section.
Styx messages need not be manipulated directly by an application designer. Any file operation that invokes Styx results in messages that perform the necessary operations on the remote name space. The exact set of messages differs depending on the call, but in all cases the complexity is concealed from the developer, who simply invokes mount, open, read and similar system commands as necessary.
The mount system call issues attach messages to the server to identify and validate the user of the connection. Each distinct use of a connection must mount it separately; devmnt multiplexes the access of the various users and their processes to the service.
File oriented system calls are converted by the kernel into Styx messages. The server devmnt translates these messages into transactions, which are then transmitted to the server as Styx messages over the communications channel. Each transaction is implemented by writing the protocol message to the server followed by reading the server channel to get the reply. Errors in the reply message are turned into system call error returns.
A read or write system call on a file served by devmnt may be translated into more than one message since there is a maximum data size (Sys->ATOMICIO, currently 8192 bytes) for a Styx message. The system call will return when the specified number of bytes have been transferred or a short reply is returned.