OS & Hardware

In nested paging where both guest and host use 4-level page tables, how many memory accesses can a TLB miss require in the worst case?

  1. A8
  2. B16
  3. C24
Show answer and explanation

Answer: C. 24

Each of the guest's four table locations is a guest physical address, so it must be translated through the host's four levels before it can be read. Each guest level costs four host reads plus one guest-table read, five in all, giving 20 for four levels; translating the final guest physical address of the data itself through the host's four levels adds four more, for 24. As a formula, (4 + 1) × (4 + 1) − 1 = 24. Eight assumes simply walking four levels twice, overlooking translation of the table locations.

  • A. Eight overlooks translating the guest table locations.
  • B. Sixteen simply multiplies 4 × 4.
  • C. Correct. (4 + 1) × (4 + 1) − 1 = 24.
Practice this topic Back to topic

More OS & Hardware questions

  1. What is it called when a guest OS executes a privileged instruction, control passes to the hypervisor, and the hypervisor reproduces the instruction's effect on its behalf?
  2. Which describes paravirtualization?
  3. Which correctly distinguishes containers from virtual machines?
  4. Many OSes map the kernel into part of every process's address space (for example the upper range) and forbid user-mode access through page-table protection bits. What is the main advantage of this layout?
  5. With a 4 KB page size, how many virtual address bits represent the position within a page (the offset)?