What is the session layer in the OSI model?
The fifth layer of the OSI model is the session layer. It organises the data transfer, synchronises systems. and is responsible for the connection between two end systems. In the event that a connection is terminated, the session layer allows the systems to continue communicating where they left off once the connection is restored.
What is the session layer?
The session layer is also known as the communication management layer. It is the fifth of seven layers in the OSI model. This conceptual model was developed in the 1970s to create a standard for communication between different devices and systems within a network.
All seven layers have their own tasks and are built upon each other. The session layer is responsible for the organisation of the connection between two end systems. To do this, the layer creates sessions, which offer different services. The session layer works closely with the layers around it in the OSI model. The seven layers are as follows:
- Physical layer
- Data link layer
- Network layer
- Transport layer
- Session layer
- Presentation layer
- Application layer
How does the session layer manage communication between systems?
The main task of the session layer is to create a logical connection between two systems. This connection is known as a session, which is then monitored by the session layer. To enable sessions, this layer temporarily allows access to another system and then manages the communication between the two systems.
Sessions can occur at the same time, parallel to each other or in one direction. You might hear the term dialog control, which is the responsibility of the session layer. In the event of one-sided communication, the session layer can send out a token to control the direction and allow for unaffected dialog.
These tokens are separated into four categories:
- Data token: these show which side may send data for half-duplex operations.
- Activity major token: activity major tokens separate a connection into different activities. If an activity is terminated or cancelled, it can be restored in the same session or a later one.
- Synchronise minor token: these tokens are numbered from 0 to 999,999 and are used to separate communications. You can find out more about synchronisation in the next section of this article.
- Release token: these mark the end of the session.
Synchronisation on the session layer
Alongside organising and managing communication, the session layer carries out the synchronisation of the data transfer. This primarily comes into effect when a data transfer is unexpectedly and involuntarily terminated on the fourth layer or below.
In such cases, the session layer creates special synchronisation points. If the communication is terminated, the transfer can be restored at the same point. This is of particular use if the communication occurs across a slow or unstable connection, or if there is a lot of data being transferred.
The synchronisation points created by the session layer can be broken down into two categories.
- Major synchronisation points separate data which can be transferred in single units. These synchronisation points must be specifically confirmed.
- Minor synchronisation points ensure logical and practical structures within the units. They do not need to be confirmed.
Which services does the session layer carry out?
The services offered by the session layer are made available to application processes and aim to better organise and synchronise communication. They are used when the session layer asks the transport layer (layer 4) to connect to another system. The various services are grouped into functional units. The International Organization for Standardization (ISO), which also took part in developing the OSI model, has suggested the following classification for functional units. The appropriate combination is determined by both parties prior to the beginning of the session.
- Basic Combined Subset (BCS): compatible with kernel, half-duplex and duplex
- Basic Synchronised Subset (BSS): compatible with kernel, half-duplex, negotiated release, minor and major synchronisation points as well as resynchronisation
- Basic Combined Subset (BAS): compatible with kernel, half-duplex, minor synchronisation points, exceptions, activities management
Session layer protocols
There are numerous protocols that use the OSI session layer. For this purpose, the session layer makes its protocols and services available to the higher layers via programming interfaces. The parameters and characteristics of the lower layers are not relevant for these communication connections. Among the protocols that use the session layer are: