About this question

Simplified TCP State Machine (Kernel-Bypass Connection Lifecycle)

Hard · low_latency · Quant Developer interview question · tcp, state-machine, kernel-bypass, dpdk, low_latency, networking

Kernel-bypass networking moves TCP/IP processing to user space, eliminating kernel overhead for each packet. This technique is critical in high-frequency trading, where user-space TCP stacks on co-located servers implement the connection lifecycle directly to achieve sub-microsecond latencies. This problem simulates a simplified version of this TCP state machine for a single connection. Task Implement the function tcp_state_machine(const double events, int n) that processes a sequence of TCP ev