I/O automaton model of operating system primitives