Calculating size of the page table
Consider a machine with 64 MB physical memory and a 32-bit virtual address space. If the page size is 4 KB, what is the approximate size of the page table ? My Solution: Number of pages in physical memory = (size of physical memory)/(size of page) = 64 * 2^10 / 4 = 2^14 Number of pages in virtual memory = (size of virtual memory)/(size of page) size of virtual memory = 2^32 bits = 2^29 bytes = 2^19 kBytes Number of pages in virtual memory = 2^19/4 = 2^17 => Number of entries in page table = 2^17 Size of each entry = 17+14 =31 bits Size of page table = 31 * 2^17 bits = 31 * 2^14 bytes = 31 * 2^4 KB = 31*16 = 496 KB But the answer is 8 MB. Why?
The question has been asked before. However, there is not sufficient information in the question to determine the size of the page table. It does not specify the size of the page table entries. It does not specify the number of pages mapped to the process address space. It does not specify the division between the process and system address pace. How much of the 32 bits is part of the process address space. It does not specify whether this is a process or system table.
8MB cannot be the answer, Physical Address Space = 64MB = 2^26B Virtual Address = 32-bits, ∴ Virtual Address Space = 2^32B Page Size = 4KB = 2^12B Number of pages = 2^32/2^12 = 2^20 pages. Number of frames = 2^26/2^12 = 2^14 frames. ∴ Page Table Size = 2^20×14-bits ≈ 2^20×16-bits ≈ 2^20×2B = 2MB.
How to disable the sheet asking “Do you want to move the installer to the Trash?” after installation is complete
how to specify in test to use 'get file' from operating system library than ssh library in robotframework
What is Page fault service time?
grub-mkrescue generates corrupted iso
optimal time slice for timesharing operating system
A method of checking my cpu bit
How to refresh mapped driver before run our software?
Can every USB stick may be turned into a bootable USB?
pry - reload! behaves differently between OSes
will a page fault occur when one of the two processes executing the same program is completed?
Cross-built rpm; rpm install on target says: “intended for a different operating system”
Creating more privilege rings
How spooling requires memory protection?
Unable to install tidyr
How to test virtual machine performance in ubuntu 14.04?
What can be the possible values of C in the following code?