Open In App

Functions of Session Layer

The Session layer is the fifth layer of the OSI (Open System Interconnection) model. The session layer is responsible for maintaining, establishing, synchronizing, and terminating sessions between them. A connection is being established among the session entities by the session layer. The data received from the presentation layer is handled by the session layer. Various protocols such as PPTP, PAP, RTCP, ADSP, and SDP are used by the session layer. The below article covers the functions of the session layer in detail.

Functions of Session Layer

The session layer is responsible for various tasks that are mentioned below:



1. Session Establishment

The basic and most important function of the session layer is to establish a connection between the communicating parties known as sessions. This connection helps to transfer the data such as files, remote login, and communication over these sessions in a more ordered and reliable way. The session layer can establish connection-oriented as well as connectionless sessions. Whenever any session is released, the transport connection is also released. Sessions can be mapped onto transport connections in three ways. They are:

2. Communication Synchronization

The session layer provides proper connectivity among the systems, during this if any occurs, a recovery option known as the state is provided. For using the known state session layer adds synchronization bits in every state of the error and these bits are then used as checkpoints. For longer and complex communications the checkpoints are added to the data stream. It makes sure that data streams are received successfully and acknowledged up to the checkpoints. If any failure occurs then only the stream is retransmitted after the checkpoints. The functionality is being provided by the session layer because transport layer can mask only the communication errors, not the upper layer errors.



3. Activity Management

The session layer provides with the feature for users to differentiate among the activities that are performed during the session. The message stream can split into logical units and these logical units are known as an activities. Activity management is defined as a process of splitting of message stream into activities.

4. Dialog Management

Dialog management is defined as a process of keeping log data for the connections established for transmitting and receiving data. It is required for establishing, synchronization, preserving and ending of the conversation between the communicating parties namely sender and the receiver. For this a mechanism known as token mechanism is being used in which a user that is sharing the data is given a token if it is in half duplex mode and after the exchange it is transferred to the the another device. If the operation is in full duplex mode then no token is used for transmission of data. The efficiency of the connection is maintained if token mechanism is used.

5. Data Transfer

Data transfer is also one of the basic and important function of session layer. Session layer handles the exchange of data between the communicating systems. This exchange of data between the users can be in two modes of transmission. They are:

6. Resynchronization

Resynchronisation is also known as backward synchronization. Resynchronisation is defined as a process in which the state of dialog is being restored to its previously defined state. After the resynchronization all the tokens are restored to the positions that were set during synchronization. There are various options of resynchronisation. They are:

Frequently Asked Questions

Q.1: Which layer lies above the session layer of OSI model?

Answer:

Presentation layer lies above the session layer of OSI model. Presentation layer prepares the data for its upper layer. It states about how the devices should encode, encrypt and compress the data.

Q.2: Which layers of OSI model are known as software layers or upper layers?

Answer:

The session layer, presentation layer and application layer are known as the software or upper layers of OSI model.

Q.3: What is meant by session termination?

Answer:

Session termination is defined as a process of ending the session communication. This process of session termination is important because it releases the resources and makes sure that both the communicating devices know that session has been ended.

Q.4: Can applications interact directly with session layer?

Answer:

No, applications cannot directly interact with the session layer. They interacts with other higher layers namely presentation layer and application layer.

Article Tags :