UDP is the minimal transport: the kernel adds a checksum and a port pair to your payload and throws it at the network. No handshake, no sequence numbers, no retransmission, no state. The entire protocol is a handful of lines in the kernel's udp.c, and the send path proves it.
The application calls sendto(fd, buf, len, 0, &addr, addrlen) — one syscall for one complete message. Unlike TCP, there is no connect prerequisite (though connect() on a UDP socket merely pins the peer for faster sends, at ~20% syscall savings). The whole datagram — say 1400 bytes of JSON — is handed to the kernel in a single crossing, ~1–2 µs.
The kernel's UDP layer computes the checksum (UDP over IPv4 can skip it with checksum=0, but Linux computes by default), stamps the source/destination ports, and prepends the 8-byte UDP header. The socket's send buffer check is trivial — UDP doesn't queue for retransmission, so if the transmit path is congested the packet is simply dropped and sendto may return EAGAIN. There is no backlog to grow, no window to wait on.
The IP layer adds its header and decides on fragmentation. Datagrams up to 1472 bytes (1500 MTU minus 20 IP minus 8 UDP) fit in one frame; anything larger is split across multiple fragments, each an independent IP packet that can take a different path. Fragmentation is the quiet killer: if any fragment is lost, the entire datagram is discarded at the receiver — the reassembly timer expires and all fragments are dropped.
On the receiving host, the kernel validates the checksum, reassembles fragments if present, and hashes the 4-tuple to find the matching socket. The datagram lands in the socket's receive queue — a queue of whole messages, not a byte stream. The receiver's UDP receive buffer (default ~200 KB) drops the oldest or newest datagrams when full, depending on socket options; recvfrom then copies exactly one datagram per call.
sudo tcpdump -ni any 'udp port 53'recvfrom returns once with one datagram — message boundaries are preserved end to end. The cost story is the protocol's entire personality: one syscall in, zero retransmission timers, zero sequence-number bookkeeping, one datagram in, done. On a LAN, a UDP round trip is ~200 µs; on the internet it's whatever the path gives you, with no recovery when it's lost.
What the machine actually does is embarrassingly little: build a header, checksum, fragment if needed, transmit, and forget. That forgetting — no timer, no state, no recovery — is the entire point. UDP's performance is not speed; it's the absence of every mechanism TCP pays for.