Files, Memory Mapping, and Asynchronous I/O
Buffered reads, memory mappings, and asynchronous requests expose different interfaces to the same storage and page-cache machinery.
Planned model
Trace data from a file through page cache, copying, faults, queued requests, completion, dirty pages, and writeback.
Questions
- When does
mmapavoid copying, and when does it merely defer work to faults? - What does asynchronous I/O make asynchronous?
- Which durability guarantees require explicit synchronization?
Exercise
Choose an I/O design for replaying a large append-only log while bounding stalls and memory use.