There is a platform abstraction layer implemented by the CoreCLR that handles the implementation using the appropriate OS capabilities for asynchronous I/O. For example, on platforms that support
kevent (such as FreeBSD and macOS), they will use
kqueue for queuing and raising I/O callbacks. This is one of the many areas, but a good place to start understanding the CoreCLR and tie it back to the managed implementations.