Overview of OSI stack and protocol layering.
OSI (Open System Interconnection) was an industry wide attempt to standardize the mushrooming number of incompatible networking protocol suites in the early days of the Internet. Despite backing from industry heavy-weights, the OSI protocol suite was not accepted by the market and was eventually supplanted by the Internet protocol suite around TCP/IP.
These days OSI is usually referred to as the reference protocol layer model with seven layers (physical, data link, network, transport, session, presentation and application). Typically the upper three layers are coalesced into one application layer.
In modern operating systems, layer 1 through 4 run in the kernel while the upper layers run in user space.