&gt; But I don&#x27;t see any facilities for waiting on locks, semaphores, etc<p>There&#x27;s a very good reason for this. First of all, you can use file descriptors as locks, semaphores, condition variables, etc using pipe(2) and other functions. On Windows you can use WaitForMultipleObjects, etc on Mutex objects.<p>But select&#x2F;epoll&#x2F;kqueue&#x2F;WaitForMultipleObjects is a system call that goes in to the kernel. That is very inefficient if you want e.g. mutual exclusion using a mutex. In a modern OS, a mutex (or CriticalSection in Windows) is implemented using a futex (&quot;fast userspace mutex&quot;), which is just a spinlock in userspace that only calls to kernel if the mutex is contended. An uncontended futex can be locked and unlocked in less than 20 nanoseconds. A system call can be 100x slower than that.<p>Some languages, e.g. Haskell have a green threading system that implements mutexes and i&#x2F;o in a consistent way with i&#x2F;o using a userspace scheduler. But this depends on language and runtime implementation.