Open In App

Functions of Session Layer

Last Updated : 14 Oct, 2025
Comments
Improve
Suggest changes
1 Likes
Like
Report

Session Layer is responsible for establishing, maintaining, synchronizing and terminating sessions between communicating systems. A session is essentially a logical connection that allows data exchange (such as file transfer, remote login or online communication) to occur in an organized and reliable manner.

Note: It acts as a dialogue controller between systems, ensuring proper sequencing and synchronization of communication. It also interacts with the Presentation Layer and the Transport Layer, handling the data received from the presentation layer before passing it to the transport layer for transmission.

Functions of the Session Layer is discussed below in detail:

1. Session Establishment

The most important role of the Session Layer is to establish and manage communication sessions between devices. These sessions can be connection-oriented or connectionless. Sessions can be mapped to transport connections in three ways:

  • One-to-One Mapping: One session uses a single transport connection.
  • Many-to-One Mapping: Multiple sessions share a single transport connection.
  • One-to-Many Mapping: A single session uses multiple transport connections.

Note: Once a session is released, the associated transport connection is also released.

2. Communication Synchronization

The Session Layer ensures proper synchronization during data transfer. To achieve this, it uses synchronization bits and checkpoints:

  • Checkpoints are inserted into the data stream to allow recovery in case of failure.
  • If an error occurs, retransmission begins from the last checkpoint rather than restarting the entire communication.

Note: This functionality is crucial in long and complex communications, as the Transport Layer can only handle communication errors, not application-level synchronization.

3. Activity Management

The Session Layer divides a continuous stream of communication into logical units called activities.

  • Each activity is treated independently, which allows better management of operations performed during a session.
  • This makes it easier to differentiate between tasks within a single communication stream.

4. Dialog Management

The Session Layer manages dialogues (conversations) between communicating devices. This involves deciding who will send data and when. Two modes of communication are supported:

  • Half-duplex Mode: Only one party can transmit at a time. A token mechanism is used, where the device holding the token has the right to send data.
  • Full-duplex Mode: Both devices can transmit data simultaneously, eliminating the need for tokens.

Note: This ensures efficiency and prevents data collisions during communication.

5. Data Transfer

Data transfer is a fundamental function of the Session Layer. It manages the exchange of information between two systems by maintaining the mode of communication:

  • Half-duplex: One device transmits while the other listens.
  • Full-duplex: Both devices can send and receive data at the same time.

Note: By organizing data flow, the Session Layer ensures reliable and orderly communication.

6. Resynchronization

Resynchronization (or backward synchronization) allows a session to be restored to a previously defined state after an error or failure. There are three options for resynchronization:

  • Set: Assigns a new synchronization point serial number chosen by the user.
  • Abandon: Discards the current synchronization point serial number and sets it to an unused value.
  • Restart: Assigns a synchronization point serial number greater than the last acknowledged major synchronization point.

Note: This process ensures that sessions can recover from disruptions without restarting entirely.


Explore