Asynchronous I/O and Completion Ownership

Separate submitting an operation from consuming its result and keep resources alive until the specified completion point.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Submission records work that may finish later
  2. Backpressure bounds the outstanding obligations

Submission records work that may finish later

An asynchronous read can carry a buffer, file or device reference, and request identifier. After successful submission, another layer may still write the buffer before posting completion. The application must keep it valid and obey any ordering requirements until the contract says the operation is finished. Submitting several reads allows overlap. A completion identifier associates each result with its own state even when they return out of order.

Backpressure bounds the outstanding obligations

Each queued request retains bookkeeping and potentially memory. A bounded queue or explicit credit limit keeps a fast producer from issuing work indefinitely beyond service capacity. Cancellation also needs a contract defining whether a completion may still arrive. Queueing and throughput connect outstanding work to delay. Kernel-bypass and high-performance I/O examines how queue designs trade batching against completion latency.[1]

References

  1. Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau, Operating Systems: Three Easy Pieces ↩