Page cache

The operating system keeps a page cache in otherwise unused portions of the main memory (RAM), resulting in quicker access to the contents of cached pages and overall performance improvements.

Usually, all physical memory not directly allocated to applications is used by the operating system for the page cache.

Executable binaries, such as applications and libraries, are also typically accessed through page cache and mapped to individual process spaces using virtual memory (this is done through the mmap system call on Unix-like operating systems).

When a file write occurs, the cached page for the particular block is looked up.

In 2019, security researchers demonstrated side-channel attacks against the page cache: it's possible to bypass privilege separation and exfiltrate data about other processes by systematically monitoring whether some file pages (for example executable or library files) are present in the cache or not.