Engineer Atlas
OverviewLearnJourneysOS LabFinderRoadmapPracticeInterviewCheat SheetCompareConnections
OverviewLearnJourneysOS LabFinderRoadmapPracticeInterviewCheat SheetCompareConnections
Operating Systems
  • How Programs Run
  • Processes
  • Threads, Async & Event Loops
  • CPU Scheduling
  • System Calls & Kernel Mode
  • Stack & Heap
  • Virtual Memory & Paging
  • Files, File Systems & Descriptors
  • I/O
  • Concurrency, Synchronization & Deadlocks
  • Inter-Process Communication
  • Sockets
  • Containers & the OS
  • OS Internals Lab
  • OS Debugging & Capstone
OS + Networking
  • OS + Networking Together
OS/Learn/Sockets
Operating Systems

Sockets

The socket abstraction as the OS sees it: a descriptor with buffers behind it, and the bridge into the Networking domain.

The question this module answers · What does the kernel actually give me when I call `socket()`?
The Socket: A Descriptor With Two Kernel Buffers Behind It
▶ interactive

When you call `socket()` the kernel hands you a descriptor and allocates a send buffer and a receive buffer behind it; `bind`/`listen`/`accept` and `connect` attach that descriptor to the network stack, and from then on the application only ever copies bytes into and out of those buffers.

Engineer Atlas
GitHub·LinkedIn