31 votes 31 votes Consider a system with byte-addressable memory, $32\text{-bit}$ logical addresses, $4\;\text{kilobyte}$ page size and page table entries of $4\;\text{bytes}$ each. The size of the page table in the system in $\text{megabytes}$ is___________. Operating System gatecse-2015-set1 operating-system virtual-memory easy numerical-answers + – makhdoom ghaya asked Feb 12, 2015 • edited Jun 21, 2021 by Lakshman Bhaiya makhdoom ghaya 11.2k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 42 votes 42 votes Total no of pages $= \frac{2^{32}}{2^{12}} = 2^{20}$ We need a PTE for each page and an entry is $4$ bytes. So, page table size $= 4 \times 2^{20} = 2^{22}\;\textsf{B} = 4\;\textsf{MB}.$ Anoop Sonkar answered Feb 12, 2015 • edited Jun 21, 2021 by Lakshman Bhaiya Anoop Sonkar comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments Amal commented Jan 3, 2020 i edited by Amal Jan 3, 2020 reply Follow Share Raju Kalagoni Given that system is byte-addressable memory. Which means a bit can address a byte. Total 4 kilobytes = 4096 bytes, which can be addressed by 12 bits. Ie page offset is 12 bits. Bits required to represent the number of pages = 32-12 =20 bits, and total number of pages = $2^{20}$ Now What is mean by 32 bit logical address ? 32 bits are used to represent a word. It doesn't mean that a word is bit. A word may be a byte or 2 byte etc.. its depend on the design of the machine. Usually we represent word = 1 byte. That is why page size is in byte. 1 votes 1 votes Neelam_$ingh_222 commented Jul 6, 2020 reply Follow Share here frame no means bits required to refer frames? 0 votes 0 votes Thadymademe commented Jan 27, 2023 reply Follow Share @Neelam_$ingh_222 Yes bro . 0 votes 0 votes Please log in or register to add a comment.
8 votes 8 votes LA=32 bits Page size or offset =4KB=>12 bits pages=32-12=20 bits ..so there are 220 pages .For each page there would be an entry in the page table ..and PTE=4 bytes page table size= 220 * 4 B=> 4MB Joker answered Mar 6, 2016 Joker comment Share Follow See all 2 Comments See all 2 2 Comments reply G Phalkey commented Jan 16, 2019 reply Follow Share will answer remain same if i calculate size of PT1 then size of PT2 and then add both??.. i guess this method will also give same answer 0 votes 0 votes Harshitkmr commented Oct 16, 2019 reply Follow Share page table size=number of pages in page table(which is 2^page number bits of virtual address)x page size. why are we taking 2^20 bits of logical address as number of pages.? plz help 0 votes 0 votes Please log in or register to add a comment.