How are page files stored on hard drives?

Solution 1:

"Block" and "cluster" are filesystem-layer terminology, and "sector" is disk-layer terminology. Unlike "page", block size is determined entirely by software.

A "block", "sector", or "allocation unit" is a group of sectors that are fetched at once. Fetching more sectors at once improves latency: reading a large file a sector at a time is like trying to read a library book with a separate trip to the library for each page.

Virtual memory in Windows is just implemented as a file, and I believe it's not handled in a particularly special way.

Solution 2:

Ok, first of all pages are not as small as I thought they were. They are in MBs.

  • No, sector size not equal to page size
  • Block is a collection of sectors made by the OS to reduce the number of addresses required to manage the entire hard drive. Cluster is also a collection of sectors but contiguous. However, when the OS wants to write a file, it simply asks the HDD to write it to a free block. How that data is stored in the block is not the concern of the OS. The file maybe stored in various sectors or in a cluster.
  • Yes, perhaps they are managed differently. The block size may be different for virtual memory than for the rest of the drive. Here, block size maybe equal to the page size