← BYTES
Unix IPC·Starter·Ref: 15.1.57

What are the submission queue (SQ) and completion queue (CQ) in io_uring's basic design?

Have a question about this video? Mention reference 15.1.57 when you contact us.

   App writes a request  -->  [ Submission Queue ]  -->  kernel does it
   App reads the result  <--  [ Completion Queue ]  <--  kernel finishes
a.Shared-memory ring buffers through which the application places I/O requests it wants performed (the submission queue) and the kernel places results of requests that have finished (the completion queue)
b.Two unrelated data structures with no relationship to I/O at all
c.Two separate physical hard drives required to use io_uring at all
d.Queues used only for printing documents
io_uring's core idea is these two shared ring buffers: the application writes I/O requests ('please read this file') into the submission queue, and the kernel writes finished results into the completion queue -- both sides can inspect these shared buffers directly, which is a large part of why io_uring can avoid many of the syscalls a traditional read()/write()/epoll_wait() loop would otherwise need.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES15157#UnixIPC