Grokking Operating Systems and Networking for Backend Engineers
Vote

0% completed

​

Completion Based I/O

A small C program contains this line:

io_uring_prep_recv(sqe, sv[0], buf, sizeof buf, 0);

It asks the kernel to receive bytes from a socket into buf. At that moment, no bytes have arrived yet. The program does not wait for the socket to become ready, and it never calls recv itself. About 200 ms later, a short message arrives with the bytes already copied into buf and the count already filled in.

That is a different contract from the one used by epoll in the previous lessons. This page explains the difference between readiness and completion, how Linux's `io_uring

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content