III. Consider a virtual address system with the following parameters The memory
ID: 3722315 • Letter: I
Question
III. Consider a virtual address system with the following parameters The memory is byte addressable .Virtual addresses are 15 bits wide. . Physical addresses are 13 bits wide. The page size is 128 bytes The TLB is fully associative with 16 total entries. Recall that a fully associative cache has just one set of entries-The tag field is simply the VPN and we need to search the full TLB to check if the VPN we are seeking is in the TLB. In the following tables, all numbers are given in hexadecimal The contents of the TLB and the page table for the first 16 virtual pages are as follows. If a VPN is not listed in the page table, assume it generates a page fault. TLB Page Table Tag PPN Valid 03 1B 06 06 28 23 01 18 0 31 01 12 00 0 07 3D1 OB 11 2A 2C 0 11 1C0 1F 03 1 08 14 1 09 2A 1 3F 30 0 VPN PPN Valid 00 27 1 01 OF 1 02 19 1 03 1B 04 06 05 03 0 06 06 0 07 3D 0 08 14 1 09 2A 1 0A 21 OB 111 0C 1C 1 0 32 11 0 OF 04 1 (a) Which bits represent the VPO, the VPN? (1 point) (b) For the virtual address 0x0422, indicate the physical address. If there is a page fault, enter"_" for the PPN and Physical Address. All answers should be given in hexadecimal. (1 points) (c) Repeat for address 0x02F1 (1 points)Explanation / Answer
a. Virtual address is of 15 bits. Since the page size is 128 bytes ie.27 .Hence 7 bits represent the offset value,VPO. and rest 8 bits (15-7=8),represents the VPN. Hence the answer is 7 bits and 8 bits.
b. convert 0x0422 to binary which is 000010000100010
take the first 8 bit which represents the VPN ie 00001000 whose decimal value is 8.
from the page table the corresponding PPN value is 14 which is represented as 00001110 in binary.
for converting virtual address to physical address copy the 7 bit offset of the Virtual address.
ie 0011100100010 represents the physical address which is 0x722 in hexadecimal.
So the answer is 0x722.
c. address is 0x02F1 which is 000 0010 1111 0001 in binary.
Take the first 8 bits and covert to decimal which is 5. check the corresponding PPN entry in page table. But Since the valid bit is set to 0 , it is either invalid or already refernced.Henace a page fault occurs.
8 bits-VPN 7 bits VPO