Functions of Session Layer
Last Updated :
28 Jan, 2025
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:
- One-to-one mapping: In one-to-one mapping, one transport connection is being used by one session.
- Many-to-one mapping: In many-to-one mapping, the same transport connection is being used by the consecutive sessions.
- One-to-many mapping: In one-to-many mapping, multiple transport connections are used by one session.
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:
- Half-duplex mode: In half duplex mode of transmission of data only one user has right for initiating the data transfer.
- Full- duplex mode: In full duplex mode of transmission data can be transmitted in both the directions simultaneously.
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:
- Set: Set option is being used for setting the synchronization point serial number to any value that is being chosen by the user.
- Abandon: Abandon option is being used for setting the synchronization point serial number to an unused value.
- Restart: Restart option is being used for setting the synchronization point serial number o any of the used value that is grater than the synchronization point serial number which identifies the last acknowledged major synchronization point.
Similar Reads
Session Layer in OSI model
The Session Layer is the 5th layer in the Open System Interconnection (OSI) model which plays an important role in controlling the dialogues (connections) between computers. This layer is responsible for setting up, coordinating, and terminating conversations, exchanges, and dialogues between the ap
6 min read
Design issues in Session Layer
Session Layer is one of the Seven Layers of OSI Model. Physical layer, Data Link Layer and Network Layer lack some services such as establishment of a session between communicating systems. This is managed by Session Layer which particularly behaves as a dialog controller between communicating syste
2 min read
Tensorflow.js tf.layers.add() Function
Tensorflow.js is an open-source library developed by Google for running machine learning models and deep learning neural networks in the browser or node environment. It also helps the developers to develop ML models in JavaScript language and can use ML directly in the browser or Node.js. The tf.lay
2 min read
Session Initiation Protocol
Session Initiation Protocol was designed by IETF and is described in RFC 3261. It's the protocol of application layer that describes the way to found out Internet telephone calls, video conferences and other multimedia connections, manage them and terminate them. It's one module. it's ready to estab
2 min read
Presentation Layer in OSI model
Presentation Layer is the 6th layer in the Open System Interconnection (OSI) model. This layer is also known as Translation layer, as this layer serves as a data translator for the network. The data which this layer receives from the Application Layer is extracted and manipulated here as per the req
4 min read
Function Notation in Math
Function notation is a precise and simplified way to express the relationship between inputs and outputs. Instead of using the typical y = format, function notation replaces y with a function name, such as f(x), where f represents the function's name, and x is the input variable. This format helps m
6 min read
Application Layer Services
The Application Layer is the topmost layer in the OSI (Open Systems Interconnection) model, directly interacting with end-user applications. Its primary role is to provide services and interfaces that allow applications to communicate over a network. It facilitates data exchange between software app
5 min read
TypeScript Function
TypeScript functions are blocks of reusable code designed to perform specific tasks. They support object-oriented programming principles like classes and polymorphism. Functions can include type annotations for parameters and return values, enhancing code clarity, safety, and maintainability. Syntax
2 min read
Session Layer Messaging Protocols in IoT
The Session Layer (Layer 5 of the OSI model) manages and controls device connections. It initiates, manages, and ends communication sessions. Several protocols have been developed for the session layer in IoT to provide efficient and reliable communication. In this article, we will discover various
5 min read
Session vs Token Based Authentication
The Session and Token-based Authentication methods are used to make a server trust any request sent by an authenticated user over the internet. In this way, a user can interact with their account without continually specifying their credentials. These methods are usually used for different purposes.
5 min read