0 votes 0 votes A computer system implements a 36 bit virtual address. Page size of 4 KB and the size of physical memory is 30 bits. The approximate size of page table in the system is ________ MB. I got 36 but given answer is 48.Which is correct? Operating System made-easy-test-series operating-system virtual-memory + – rahul sharma 5 asked Dec 18, 2017 • edited Mar 7, 2019 by Aditi Singh rahul sharma 5 1.3k views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments VS commented Dec 20, 2017 reply Follow Share @rahul sharma 5 What to take in such questions then 3B or 18 bits ? 0 votes 0 votes rahul sharma 5 commented Dec 20, 2017 reply Follow Share I would take 18 bits only.As there is no hint in question to take 24 bits.Approximation can be done in numerical answers.Like we got 1.8MB and the closet option is say 2MB,but for numerical it should be accurate.Anyways,if there a need to take 3Bytes then i guess gate question will definitely contains some hint for the same.:) 1 votes 1 votes gari commented Jan 16, 2018 reply Follow Share @rahul sharma 5 It is also mentioned in the question that "memory is byte addressable".. so for storing the frame no we need 3 slots(3 bytes)..so should we consider this fact or stick with 18 bits? 2 votes 2 votes Please log in or register to add a comment.
3 votes 3 votes page table size = no. of entries in page table × page table entry size. No. of pages = 2^36/2^12 = 2^24 No. of frames = 2^30/2^12 = 2^18 So, frame no. is 18 = 3bytes(approx.) Page table size = 2^24 × 3 = 48MB Manikant Sharma 6 answered Dec 19, 2017 Manikant Sharma 6 comment Share Follow See all 4 Comments See all 4 4 Comments reply rahul sharma 5 commented Dec 19, 2017 reply Follow Share Why did you approximate 18 bits to 3B? 0 votes 0 votes Manikant Sharma 6 commented Dec 19, 2017 reply Follow Share 18 bits = 3 bytes (approx.) It can be understood in two ways 1. As given in question, memory is byte addressable so it will include 6 padding bits(Data alignment concept) to make it complete 3 bytes. Here, we are assuming that page table entry contains only frame no. 2. Page table entry size contains many information apart from frame no. There is also auxiliary information about the page such as a present bit, a dirty or modified bit, address space or process ID information, amongst others. So it is asking approx size so you can consider that to 3 bytes. Hope your doubt is clear. 1 votes 1 votes rahul sharma 5 commented Dec 19, 2017 reply Follow Share But in gate numerical.The answer should be as close to exact.I would still prefer using 18 bits.\ 1 votes 1 votes Manikant Sharma 6 commented Dec 19, 2017 reply Follow Share It's not a matter of preference, it is given in question that memory is byte addressable. So bytes will be read by processor not bits. That is why padding will be done. Let me give you a familier example of this. 7 in decimal = 111 in binary but we write it as 0111 in 4 bit binary representation. The extra bit is padding bit included to make access compatible as per processor. 48 is the exact answer whether it is numerical or mcq type does'nt matter. Just stick to the basic concepts. 2 votes 2 votes Please log in or register to add a comment.
0 votes 0 votes 36MB is right ans sachin! answered Dec 19, 2017 sachin! comment Share Follow See all 0 reply Please log in or register to add a comment.