6 ms·
Side conversation. I am constantly amazed how a tiny piece of code, the linux (or bsd) TCP stack, can be a source of mysteries and adventures for decades, eve
by imglorp 7y ago
Side conversation.
I am constantly amazed how a tiny piece of code, the linux (or bsd) TCP stack, can be a source of mysteries and adventures for decades, even for kernel experts and industry leaders like CF. The thing has around 11 states and 20 transitions, around 4000 LOC.
Compare this with some of the multi-million LOC, distributed monsters we all know and love.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/ipv4/tcp.c?h=v5.3 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
- option_greek 7y agoIsn't that just TCP (rather than TCP stack).
- imglorp 7y agoYes, sure, but the protocol and one implementation of it are pretty tightly coupled. As a measure of algorithmic complexity (ala Chaitin?), the kernel code should show us at least order of magnitude, 4 K lines of code. Compared to, say Google which is 2 billion, a tad more complex.
- dunkelheit 7y agoThis is an example of "the settings problem". When a system has even a moderate number of behaviors controlled by their respective settings the number of possible interactions rises exponentially. Combine that with different possible user behaviors and you get a combinatorial explosion of possibilities with some weird results that are non-obvious even to experts.
- imglorp 7y agoThat's a good point, plus it's not just (states x transitions), it's also a whole bunch of hidden state: the other guy's state as well as all the packets in flight.