INTRO TO SESSION LAYER
The session layer is the fifth layer of the OSI model, which is responsible for establishing, managing, and terminating sessions between applications or systems. A session is a connection between two or more devices, and it can be used for various purposes, such as file transfer, remote login, email, and other applications.
The primary function of the session layer is to provide a reliable and orderly way of transferring data over these sessions. It ensures that the upper layer data units are delivered in a proper sequence and without any loss or duplication.
To achieve this, the session layer provides three main services: session establishment, dialog control, and session release. Session establishment refers to the process of initiating and configuring a session between two devices. Dialog control is the mechanism that manages the exchange of data between the devices during the session, which can be either half-duplex or full-duplex. Session release, on the other hand, terminates the session connection and releases the allocated resources.
The session layer also provides services for synchronization, resynchronization, and recovery from errors. Synchronization ensures that the devices are in the same state during the session and that the communication is error-free. Resynchronization, on the other hand, allows the session to be restored to a previous state in case of errors. Recovery services ensure that the session can recover from errors, and communication can continue.
DESIGN ISSUES
The design issues of the session layer include various factors that need to be considered for designing the session layer in a communication system. Here are some of the important design issues:
Session Establishment: One of the key design issues is the establishment of the session between the two communication entities. The session establishment process includes exchanging session establishment messages, deciding on the parameters of the session, and agreeing on the synchronization and dialog management mechanisms.
Synchronization: Synchronization refers to the coordination between the two communication entities to ensure they are in the same state of interaction at any given point in time. The design of the session layer needs to include synchronization mechanisms to achieve this goal.
Dialog Management: Dialog management involves controlling the turn-taking between the communication entities. The design of the session layer needs to include dialog management mechanisms to enable effective communication and avoid conflicts between the entities.
Session Maintenance: The session layer needs to maintain the established session, including ensuring the integrity of the session and its data, handling any interruptions or errors, and properly releasing the session when it is no longer needed.
Data Transfer: The session layer is responsible for ensuring reliable transfer of data between the communication entities. The design needs to include mechanisms for data transfer, such as error control, flow control, and segmentation.
Security: The session layer needs to provide secure communication between the entities. This includes the authentication of the entities, confidentiality of the data, and integrity of the data during transfer.
Session Termination: The session layer needs to properly terminate the session when it is no longer needed. This includes properly releasing the session resources and handling any errors or conflicts during the release process.
Overall, the design of the session layer needs to consider various factors to ensure effective and reliable communication between the entities while also maintaining security and integrity of the data. SERVICES
The session layer is responsible for setting up and maintaining connections, or "sessions", between computers so they can communicate with each other. It provides several services to ensure reliable data transfer, including:
- Session establishment: Establishing a connection between two computers for communication, file transfer, remote login, or other purposes.
- Normal data transfer: The exchange of data between user entities, which can be a two-way alternate or two-way simultaneous.
- Dialog management: Keeping track of whose turn it is to talk during a half-duplex session by using data tokens.
- Session release: Four ways to release a session connection, including user or provider-initiated release, orderly release, and negotiated release.
- Synchronization: Ensuring the same state of interaction between session service users at any point in time by inserting synchronization points into interactions.
- Resynchronization: Restoring the state of the dialog to a previously defined state if needed.
- Activity management: Allowing the user to split the message stream up into logical units called activities.
- Reporting: Providing a reporting facility for unexpected errors to the other computer.
Overall, the session layer provides the tools necessary for establishing and maintaining communication between computers, ensuring data is reliably transferred and errors are reported.
1.The session layer is responsible for setting up and managing connections between two devices, also known as a session. This connection allows devices to communicate with each other, share files, and log in remotely.
There are two types of sessions that can be established: connection-oriented and connectionless. Connection-oriented sessions are reliable and ensure that data is transferred in the correct order, while connectionless sessions are not reliable and may not ensure data is transferred in the correct order.
The session layer can establish a session between two devices by setting up a transport connection. This transport connection is similar to the connection made by the transport layer, but the session layer ensures that a transport connection is established before communication can begin. When the session is ended, the transport connection is also ended.
The session layer can map sessions onto transport connections in three different ways: one to one, many to one, and one to many.
In one to one mapping, one session uses one transport connection. This is useful when the session requires a dedicated connection.
In many to one mapping, consecutive sessions use the same transport connection. This is useful when multiple sessions are required but can share the same connection.
In one to many mapping, one session spans multiple transport connections. This is useful when a session requires multiple connections, for example, if one connection is not enough to handle the amount of data being transferred.
2. Sometimes, the computers communicate in half-duplex mode, which means they take turns talking instead of talking at the same time. In this case, the session layer keeps track of whose turn it is to talk, which is known as dialog management.
To do this, the session layer uses data tokens, which are like virtual objects that represent the right to transmit data. When a half-duplex session is established, the computers negotiate to determine which side gets the token first. The computer with the token is allowed to transmit data while the other computer remains silent. When the token holder is finished transmitting data, they pass the token to the other computer. Once the other computer receives the token, it can now transmit data while the first computer remains silent.
In a full-duplex operation, the computers can transmit data simultaneously, so no token is needed. However, in half-duplex mode, the session layer uses tokens to ensure that the computers take turns talking and that the communication is orderly and reliable.
3. When you are done using a session, you need to release the connection. There are four ways to release a session connection:
User abort: One of the users can stop the session without informing the other user.
Provider abort: The provider can stop the session without informing the users.
Orderly release: Both users agree to end the session and make sure all data has been transmitted before ending the connection.
Negotiated release: One user requests to end the session and the other user can either agree or disagree based on certain conditions.
User and provider aborts are quick ways to end the session, but you might lose data. With orderly release and negotiated release, you make sure all the data has been transmitted before ending the connection. Provider abort only occurs when there are serious errors.
4.
Synchronisation
Synchronisation assures the same state of interaction between session service users at any point in time. If an error or disagreement occurs, the session entities are moved back to a known state. This service is provided because the transport layer masks only communication errors and not the upper layer errors. For achieving this goal, synchronisation points are inserted into interactions. The sender inserts a serial number as a synchronisation point, and the receiver confirms the receipt by sending back the serial number. It is different from acknowledgement as the acknowledgement refers to the receipt of the protocol data unit. Major and minor synchronisation points are used to make the communication instances into a dialog unit or within the dialog unit. The former is confirmed immediately while the later may not. A standard serial number is used for both of them, and their respective tokens control them. Resynchronisation Sometimes it is required for the state of dialog to be restored to some previously defined state. This is known as backward synchronization or resynchronisation. The session layer entities also provide it. There are three options of resynchronisation: Set, abandon and Restart. The sending session user continues to hold data for achieving synchronisation as long as it might need it. When resynchronisation occurs, all the tokens are restored to the original positions when the synchronisation point was set.The session layer is responsible for providing various services to the application layer. Here are the details of the services provided by the session layer:
Dialog Control: The session layer establishes and manages dialogs between two or more endpoints. It provides the necessary mechanisms to initiate, maintain, and terminate the dialog. The dialog control service includes dialog setup, management, and release.
Token Management: The session layer is responsible for controlling access to the dialog by using tokens. A token is a permission granted to a user to transmit data. The session layer uses a token to regulate access to the dialog and ensure that only one user is transmitting at a time.
Synchronization: The session layer provides synchronization services to ensure that both endpoints of the dialog are in the same state. Synchronization points are inserted at specific points in the communication to ensure that both endpoints are in the same state.
Connection Management: The session layer is responsible for establishing, maintaining, and releasing a connection between the endpoints of the dialog. The connection management service includes connection setup, maintenance, and release.
Recovery: The session layer provides a recovery service that enables an application to recover from failures or errors during the communication. It provides mechanisms for retransmission of lost or corrupted data.
Security: The session layer provides security services that ensure the confidentiality, integrity, and availability of the data being transmitted. The session layer provides encryption and decryption services to protect the data during transmission.
Service Advertising and Selection: The session layer provides a service advertising and selection service that allows applications to discover and select the services provided by other applications. The service advertising and selection service uses a directory service to keep track of available services and their attributes.
The Session layer uses a set of primitives, or basic operations, to accomplish these tasks. The most common primitives used by the Session layer are as follows:
Session establishment primitives:
Open: This primitive is used to initiate a session between two communicating applications. The Open primitive specifies the session parameters, such as the session ID and the type of session.
Close: This primitive is used to terminate a session between two communicating applications. The Close primitive terminates the session and releases all session-related resources.
Session management primitives:
Start: This primitive is used to start a session between two communicating applications. The Start primitive initiates the session and establishes the communication link.
Stop: This primitive is used to stop a session between two communicating applications. The Stop primitive terminates the communication link.
Checkpoint: This primitive is used to mark a point in the session where data can be backed up. This is useful in case of data loss or interruption in the communication link.
Recovery: This primitive is used to recover data lost or corrupted during the session. The Recovery primitive retrieves data from the last checkpoint.
Session data transfer primitives:
Send: This primitive is used to transfer data from the source application to the destination application. The Send primitive specifies the data to be transmitted and the session parameters.
Receive: This primitive is used to receive data from the source application. The Receive primitive specifies the session parameters and the expected data.
Session synchronization primitives:
Sync: This primitive is used to synchronize the data exchange between the two applications. The Sync primitive ensures that the two applications are using the same data format and structure.
Token: This primitive is used to manage the use of shared resources between the two applications. The Token primitive ensures that only one application at a time has access to the shared resource.
Overall, the primitives used by the Session layer are designed to manage the establishment, management, and termination of communication sessions between two applications. By using these primitives, the Session layer can ensure that data is transmitted reliably, efficiently, and synchronized between the two applications.
The services provided by the Session layer include:
Session establishment and termination: The Session layer is responsible for creating, maintaining, and terminating a session between two communicating applications.
Session management: The Session layer manages the dialog between two applications, including the control and synchronization of data exchange and the coordination of error recovery.
Session data synchronization: The Session layer ensures that data is properly synchronized between the two communicating applications. It also provides a way for both applications to agree on the format and structure of the data being exchanged.
The primitives or operations used by the Session layer include:
Connect: This primitive is used to initiate a connection between two communicating applications.
Disconnect: This primitive is used to terminate a connection between two communicating applications.
Data transfer: This primitive is used to transfer data between the two applications.
Token management: This primitive is used to manage the use of tokens between the two applications.
Synchronization: This primitive is used to synchronize the data exchange between the two applications.
No comments:
Post a Comment