Memory mapped files and write behind
Normal files are automatically mapped to segments to provide mapped files. This means that normal file access bypasses traditional kernel buffers and block-I/O routines, allowing files to use more memory when the extra memory is available. File caching is not limited to the declared kernel buffer area.
Files can be mapped explicitly with the shmat() or mmap() subroutines, but this provides no additional memory space for their caching. Applications that use the shmat() or mmap() subroutines to map a file explicitly and access it by address rather than by the read() and write() subroutines may avoid some path length of the system-call overhead, but they lose the benefit of the system read ahead and write behind feature.
When applications do not use the write() subroutine, modified pages tend to accumulate in memory and be written randomly when purged by the VMM page-replacement algorithm or the sync daemon. This results in many small writes to the disk that cause inefficiencies in CPU and disk utilization, as well as fragmentation that might slow future reads of the file.