Skip to content

Memory-Mapped I/O

Treating files and devices as memory regions unifies I/O and memory access, enabling the same caching mechanisms and access patterns. This abstraction lets the operating system manage data movement efficiently.

Tension Addressed

Isolation vs. Efficiency

Recognizable As

mmap patterns, shared memory between processes, zero-copy I/O, file-backed memory, database buffer pools using mapped files.

Canonical Sources

McKusick et al., The Design and Implementation of the FreeBSD Operating System; Silberschatz, Operating System Concepts

Transfers To

Database design, IPC mechanisms, high-performance file processing, embedded systems

Memory-mapped I/O eliminates explicit read/write calls, letting the virtual memory system handle data movement. This pattern recurs in databases (buffer pools), message queues (shared memory), and file processing (mapped files).