OSI Model: Session Layer Services and Functions

1.2.1 Services Offered: Data Interchange

The session layer’s primary function is data exchange. A session, like a transport connection, has three phases: establishment, use, and release. Primitives provided to the presentation layer manage these phases, mirroring those used for transport connections. Often, invoking a session primitive simply invokes the corresponding transport primitive. Despite these similarities, key differences exist, especially in connection release. Transport connections terminate abruptly with a T-DISCONNECT.request, potentially causing data loss. Session connections use an S-RELEASE.request, ensuring an orderly release without data loss. Another difference lies in data handling. The transport layer has two independent data streams: normal and expedited. The session layer adds typed and capability data to these.

1.2.2 Dialogue Management

While OSI connections are full-duplex, allowing simultaneous bidirectional communication, higher-layer software may require half-duplex operation. The session layer manages this dialogue, tracking turns and enforcing communication rules. During session initiation, the duplex mode (full or half) is negotiated, determining which user transmits first. Control is then passed back and forth between users.

1.2.3 Synchronization

The session layer provides synchronization to restore a known state after errors. While the transport layer handles communication errors, the session layer addresses higher-layer issues. Users can insert synchronization points, effectively creating pages within the data stream. In case of problems, the session can be restored to a previous synchronization point. Two types of synchronization points exist: major and minor, each with its own primitives. Major synchronization points delimit dialogue units, representing significant portions of work. For example, chapters in a book could be delimited by major synchronization points.

1.2.4 Activity Management

Related to synchronization, activity management allows users to divide message flows into logical, independent units called activities. The session layer’s role is to ensure that S-ACTIVITY requests are communicated between users. It doesn’t interpret the activity’s meaning or use. Activities are tied to synchronization points. Starting an activity sets the synchronization point serial number to 1 and inserts a major synchronization point. Additional synchronization points can be set within the activity. Resynchronization to a point before the activity’s start is impossible.