Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

i Miss rate (cache, main memory, disk memory) 4. A byte-addressable virtual memo

ID: 3717714 • Letter: I

Question

i Miss rate (cache, main memory, disk memory) 4. A byte-addressable virtual memory system has 8 virtual pages of size 64 bytes each, and with four page physical frames. A some point in a program execution, the snapshot of the page table is as follows Page# 0 | Frame # Valid bit a) How many bits are in a virtual address? b) How many bits are in a physical address? d) What physical address corresponds to the following virtual addresses? Iif the address causes a page fault, simply indicate this is the case) (1) 00H: (x2) 44H: (x3) C2H: (x4) 80H.

Explanation / Answer

a) 8 virtual pages of size 64 bytes each is 23 x 26 = 29. Therefore, each virtual address has 9 bits.

b) There are 4 page frames of size 64 each, or 22 x 26 = 28. So each physical address has 8 bits.

c)

i) 0x00 = 000 000000 so this address is on page 0, offset 0. Page 0 maps to frame 1. Substituting 01 for 000, we get 01 000000, or 0x10.

ii) 0x44 = 001 000100 so this address is on page 1, offset 4. Page 1 maps to frame 3. Substituting 11 for 001, we get 11 000100, or 0xC4.

iii) 0xC2 = 011 000010 so this address is on page 3, offset 2. Page 3 maps to frame 0. Substituting 00 for 011, we get 00 000010, or 0x02.

iv) 0x80 = 010 000000 so this address is on page 2, offset 0. Page 2 is not currently in memory so this generates a page fault.