1/6
Looks like no tags are added yet.
Convert the LA 37000 to a PA. Assume that the page size is 4KB PageTable[0..10] = (9, 5, 28, 54, 36, 17, 0, 14, 3, 7, 49)
LA = 37000 = 4KB ∗ 9 + 136 = (p = 9, d = 136). PageTable[p = 9] = 7 = f . So, the corresponding PA = (f = 7, d = 136) = 4K ∗ 7 + 136 = 28808.
A machine has 32-bit logical addresses. Page size is 16KB. Each page table entry takes 4 Bytes. How much memory is needed to hold a full page table?
Page size is 16KB = 16 ∗ 2^10B= 2^14B. So, 14 bits are needed to specify the offset within a page. 32 − 14 = 18 bits are used for the page number. A full page table can have 2^18 entries.Each entry takes 4 bytes. Page table size is 2^18 ∗ 4B = 2^20B = 1MB
A computer with 32-bit logical address uses a 2-level page table. The page table fields for the two levels are 8 bits (outer level), and 11 bits (inner level) long.
Find the size of the logical address space in MB/GB:
Find the number of pages:
Find the size of each page in KB:
Find the number of pages in the outer level page table:
Find the number of entries in the outer level page table:
Find the number of pages in the inner level page table:
Find the number of entries in each page of the inner level page table:
2^32B = 4GB.
2^8+11 = 2^19.
2^32−19B = 2^13B = 8KB.
Only one always.
2^8 = 256.
2^8 = 256.
2^11 = 2048.
Convert the virtual address 37000 to a physical address. (page size is 4KB)
LA = 37000 = 4K ∗ 9 + 136 = (9, 136). PT [9] = [5, 1]. So, PA = (5, 136) = 4K ∗ 5 + 136 = 20616
A computer has four page frames. The time of loading, time of last access, and the R and M
bits for each page are as shown below (the times are in clock ticks):
Page Loaded Last Ref. R M
0 230 285 1 0
1 120 265 0 0
2 140 270 0 1
3 110 280 1 1
a). Which page will FIFO replace?
b). Which page will LRU replace?
c). Which page will second chance replace?
d). Which page will enhanced second chance replace?
a). Page 3 because it is loaded at 110 (First In)
b). Page 1 because is referenced at 265 (Least Recently)
c). Page 1 because it is loaded at 120 and the reference bit is 0
d). Page 1 because (R,M) = (0,0)
What binding do most modern OSs use?
execution time binding
What HW support is needed for VM?
Valid/Invalid bit in PT, another table containing the address of each page in the disk, swap space on the disk