A developer built a green thread runtime in Rust to understand systems programming, implementing user-space threads managed by the runtime instead of the OS kernel. Green threads require managing stacks and CPU registers; the project uses 32 KiB stacks allocated via mmap with guard pages to prevent stack overflow into other memory.
This 2022 paper warns that memory-mapped (mmap) file I/O, despite appearing simpler than traditional buffer pools, has severe correctness and performance issues that make it unsuitable for modern database management systems. The authors document why several popular DBMSs abandoned mmap after encountering hidden problems, and provide guidance on when mmap might be appropriately used.