Session Layer of the OSI Model
Session Layer of the OSI model
This is the fifth layer of the OSI model. This layer establishes, manages, synchronizes and terminates connection between the computers. It also sets up, coordinates and terminates interactions and dialogs between communicating devices. It provides either half duplex or full duplex service.
Session layer receives data from the presentation layer. It adds header and synchronization bits to the data and passes data to the transport layer. At the receiver side, session layer receives data from transport layer. It detaches header and synchronization bits from the data and passes data to the presentation layer.
Responsibilities of session layer are:
Dialog Control - The session layer is responsible for setting up sessions between devices. It allows two devices to enter into dialog (communication process). These dialogs can take place either in half-dupplex or full duplex mode. Dialog control is implemented using a data token. The user that has the token is only allowed to send the data. When the user is done with the operation the token is passed on to next user. Synchronization - At the session layer, checkpoints (synchronization bits) are added into a stream of data to synchronize the sessions. For example, if a device is sending a file of 1000 pages, then you can insert checkpoints after every 100 pages to ensure that these 100 pages are received without an error and acknowledged independently. If an error occurs while transmitting page 631, the only pages that should be retransmitted are from 601 to 631. Previous pages need not to be resent because the successful reception of the pages form 1 to 600 must have acknowledged before transmission of the pages from 601 to 700.
The Session layer of the OSI model passes data to the Transport layer which divides the data into segments with each other having its own head and transports these segments to the network layer. On the other hand, as a receiver transport layer receives packets from the network layer after which it detaches headers from the packets received and then reassembles the segments into original message and transfers and carries forward that message to the Session layer of the OSI Model.
You may also be interested in understanding the other seven layers of the OSI Model