Async I/O in Depth: State Machines, Event Loops and Non-Blocking I/O System Calls