C8 Computer organization · Practice
Virtual memory
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
0 solved
0 in a row
0 of 11 kinds solid
Check
A program uses virtual address 01312D00, with 4 KiB pages.
(a)
What is its virtual page number?
(b)
What is its page offset?
Check
A virtual page maps to physical page 01001, and the page offset is A2C. What physical address results (4 KiB pages)?
Check
A machine has 36-bit virtual addresses, pages of bytes and 8-byte page-table entries.
(a)
How many pages does a single-level table have to describe?
(b)
How big is that table, in MiB?
Check
A TLB answers in 1 cycle and hits 0.99 of the time. Memory takes 60 cycles and the page table has 4 levels.
(a)
What is the average time per access?
(b)
How many times faster is that than walking the table on every access?
Check
A TLB has 64 entries, and pages are 4 KiB.
(a)
What is the TLB's reach?
(b)
How many different pages can a loop touch over and over without a TLB miss, at most?
Check
An access normally takes 100 ns, but 10 in a million accesses page-fault, costing 5 ms each. What is the average access time?
Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.
Check
Virtual addresses have 32 bits, pages are 4 KiB and entries 4 bytes.
(a)
How big is a flat page table?
(b)
How many entries fit in one page?
Check
A TLB hits 99% of the time in 1 cycle; memory takes 60 cycles and the page table has 4 levels.
(a)
What's the average access time?
(b)
And with no TLB?
Check
What is the virtual page number of 007D0000 with 4 KiB pages?
Check
Physical page 0012C, offset 040: what physical address?
Check
What is the reach of a 64-entry TLB with 4 KiB pages?
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in C8