What this virtual memory and paging interview question tests
This is an easy operating systems question that tests whether you understand the relationship between address space size, page size, and the number of virtual pages in a system. It is a foundational concept that interviewers use to gauge comfort with memory management and virtual addressing.
To approach problems like this, you need to reason about how an operating system divides the total addressable memory into fixed-size chunks called pages. The calculation hinges on understanding the constraints imposed by the CPU's address width and the kernel's choice of page granularity. This skill is essential for reasoning about memory efficiency, TLB behaviour, and page table design in systems programming roles.
- Address space and bit width
- Page size and page offset
- Virtual address translation
- Page table capacity