What does OSI Layer 5 (Session) do?
OSI Layer 5 (Session) opens, keeps alive, and closes the ongoing dialogue between two applications — and can checkpoint a long transfer so it resumes from the last good point instead of restarting.
Layer 5 = Session Layer
A single connection often carries a long conversation made of many back-and-forth exchanges. The Session layer is the bookkeeper for that whole conversation, handling three jobs:
- Dialog setup, maintenance, and teardown — it establishes the session when the apps start talking, keeps it organised while they exchange data, and cleanly terminates it when they're done.
- Dialog control — it decides whose turn it is to send (for example, half-duplex turn-taking versus full-duplex free-for-all).
- Synchronization / checkpointing — it inserts checkpoints into a long stream so that if the link drops during, say, a large file transfer, recovery restarts from the last checkpoint rather than from scratch.
Why it matters: without session management, a 2-hour transfer that fails at 99% would have to start over. Checkpointing is what makes resumable transfers possible.
Note: the Session layer is the most blurred layer in practice — pure OSI session protocols are rare, and the functions above are usually handled inside applications or libraries rather than a distinct layer. Focus on the functions (establish / manage / terminate dialogs, checkpoint/recover) rather than memorising "session protocols," because their real-world layer mapping is contested.
Memory tip: Layer 5 is like a "Session manager" at a conference - manages when conversations start and end.
Go deeper:
Session layer — dialog setup/teardown, dialogue control, and synchronization/checkpointing.