6. The Session LayerThis chapter describes the session layer of the OSI model. The session layerprovides a structured means for data exchange between user processes (orapplications) on communicating hosts. This layer uses the term session instead ofconnection to signify the point that communication is studied from an applicationrather than a host point of view. More specifically, a session imposes a set of ruleson the way applications should communicate. Also of interest are: how a session isnegotiated between two applications, the synchronization and control of messageexchanges between applications (e.g., how they should take turns), the context ofmessages (e.g., whether they relate to records from a database or keystrokes on aterminal), dealing with transport failures, and the bracketing of messages as requiredby some applications.We will first look at the session service primitives and their use by higher layers.Then we will describe the session protocol and related issues, such as the use oftokens in activities and dialog units, synchronization, error handling, and the structureof session messages. Finally, we will list a number of session layer standards.