Virtual Memory Review


A stream of virtual addresses as seen on a system is given below:
      4095,  31272,  15789,  15000,  7193,  4096,  8912
Assume 4 KiB pages, a 4-entry fully associative TLB and true LRU (least recently used) replacement. If pages must be brought in from disk, increment the next largest page number. The initial state of the TLB and page table is given below. Show the final state of the system. (The last column “Time Since Last Access” is only for your bookkeeping.)

Initial TLB
# Valid Tag Physical Page Number Time Since Last Access
0 1 11 12 4
1 1 7 4 1
2 1 3 6 3
3 0 4 9 7
Final TLB
# Valid Tag Physical Page Number Time Since Last Access
0
1
2
3

Initial Page Table
# Valid Physical Page or in Disk
0 1 5
1 0 Disk
2 0 Disk
3 1 6
4 1 9
5 1 11
6 0 Disk
7 1 4
8 0 Disk
9 0 Disk
10 1 3
11 1 12
Final Page Table
# Valid Physical Page or in Disk
0
1
2
3
4
5
6
7
8
9
10
11