Virtual memory layout [20] You have a 64-bit machine and you bought 8GB of physical memory. Pages are 256KB. For all calculations, you must show your work to receive full credit. (a) [1] How many virtual pages do you have per process? (b) [1] How many bits are needed for the Virtual Page Number (VPN)? (Hint: use part (a)) (c) [1] How many physical pages do you have? (d) [1] How many bits are needed for the Physical Page Number (PPN)? (Hint: use part (c)) (e) [1] How big in bytes does a page table entry (PTE) need to be to hold a single PPN plus a valid bit? (f) [1] How big would a flat page table be for a single process, assuming PTEs are the size computed in part (e)? (g) [10] Why does the answer above suggest that a "flat page table" isn't going to work for a 64-bit system like this? Research the concept of a multi-level page table, and briefly define it here. Why could such a data structure be much smaller than a flat page table? (h) [4] Does a TLB miss always lead to a page fault? Why or why not?

Respuesta :

We have 2^48 pages per person. The number of physical pages is 2^16.. 48 bits of VPN are mapped to 16 bits of PPN. The PTE size is 2B. The page table size is 2^49 B.

What are the steps to calculate pages per person, physical pages, VPN ,PTE size and the table size?

We know that;

Virtual Address = 64bits

Virtual Address Space = 2^Virtual Address = 2^64B

Physical Address Space = 4GB  = 4 X 2^30 B = 2^32 B

Physical Address = log_2(Physical Address Space )  = log_2(2^32)

                             = 32 * log_2(2) = 32 bits.

Page size = 64KB =2^16 B

a) No of Virtual Pages = Virutal Address Space/PageSize

                                      =  2^64B / 2^16 B = 2^48

b) NoOfPhysicalPages = PhysicalAddressSpace/PageSize

                                      =  2^32 B / 2^16 B = 2^16

c) VPN (in Bits) = log_2(NoOfVirtual Pages)   = log_2(2^48) = 48

    PPN(inBits)=log_2(NoOfPhysicalPages)=  log_2(2^16) = 16

Thus 48 bits of VPN are mapped to 16 bits of PPN.

d) PTE( Page Table Entry) holds the Physical Page Number of given Virtual Page along with many information about the page.

PTEsize = PPN(inBits) = 16 bits = 2B

e) Flat page table is single level page table. A page table contains the Physical Page number for a given page number. It helps in the translation of Vitual Address to Physical Address.

PageTableSize = NoOfVirtualPages*PTEsize = 2^{48}*2B = 2^49

To know moe about  pages refer:

https://brainly.com/question/1362653

#SPJ4

ACCESS MORE