0 votes 0 votes In paging , giving more bits to the innermost table as compared to the outermost page table results in using less physical memory space. Is this statement true always? ankit3009 asked Jan 12, 2022 ankit3009 408 views answer comment Share Follow See all 7 Comments See all 7 7 Comments reply palashbehra5 commented Jan 12, 2022 i edited by palashbehra5 Jan 12, 2022 reply Follow Share Consider P1 : <12,8,14> and P2: <8,12,14> https://www.desmos.com/calculator/jcbyohyvc1 a is the size of a process. 2 votes 2 votes ankit3009 commented Jan 12, 2022 reply Follow Share Thank you for the effort @palashbehra5 . But I wasn’t able to understand the variation :( 0 votes 0 votes palashbehra5 commented Jan 12, 2022 reply Follow Share I assumed a process a required ‘a’ amounts of main memory. Now consider two architectures P1 : <12,8,14> and P2 : <8,12,14> Where $2^{14}$ is the page size. 4B are taken as page table entry size. Now, overhead for the process in P1/P2 can be calculated by first finding out the number of pages the process needs, then the overhead due to the page table. No of pages required in P1/P2: $a/2^{14}$ Their outer page table overhead will be the same for all types of processes, however, inner page tables will depend on the number of pages required. Finally, ${ Number \ of \ pages * Page \ table \ entry \ size }$ can be divided by inner page table size to get total inner page tables required. Multiply that size of inner page table to get total overhead. Total overhead P1 : $2^{14}+\operatorname{ceil}\left(\frac{a}{2^{22}}\right)\cdot2^{10}$ Total overhead P2 : $2^{10}+\operatorname{ceil}\left(\frac{a}{2^{26}}\right)\cdot2^{14}$ ceil functions used as consider a case where 257 pages are required, P1 will need 2 inner page tables ,however, P2 will only need 1, which will lead to less overhead. Hence, you would get the same overhead for the number of pages power of 2, but P1 with slightly more overhead for other values. If you find any errors do let me know. 1 votes 1 votes ankit3009 commented Jan 12, 2022 reply Follow Share Yes, thanks for the descriptive answer. I too solved an example and found that the space required by physical memory is varying with respect to the allotment of bits to the inner level and outer level page table. I think, your conclusion is also the same that it does vary (not sure everytime, but it does vary sometimes, right?) 1 votes 1 votes palashbehra5 commented Jan 12, 2022 reply Follow Share It does, check the link again, it calculates total overhead with varying ‘a’. 1 votes 1 votes Zack Fair commented Jan 13, 2022 reply Follow Share palashbehra5 ,I am not able to follow this question properly, also I didn’t understand whether the final answer is “Yes” always true or “No” not always true.( Please do mention that ).Now about the question I got few questions?What does it mean by line “less physical memory space used” ?Does it mean the memory that would be used for entire page table ,through all levels likesize of outer level + total size of inner levelorDoes it mean the memory that would be used while accessing a particular page?size of outer level + size of single page of inner level?PS : Also in those graphs I changed few values ,is this correct ? and what does it imply? 2 votes 2 votes palashbehra5 commented Jan 13, 2022 reply Follow Share > I am not able to follow this question properly, also I didn’t understand whether the final answer is “Yes” always true or “No” not always true. ( Please do mention that ). Not always true, as more bits for the outer page table can lead to more overhead. > What does it mean by the line “less physical memory space used”? Memory overhead due to paging. https://courses.engr.illinois.edu/cs241/sp2014/lecture/09-VirtualMemory_II_sol.pdf > size of outer level + size of a single page of inner level? Yes, that's what I considered total overhead here, however, the inner page table need not be in kernel space all of the time, it can be swapped to disk. > is this correct? and what does it imply? I Believe your concern is despite having fewer bits in the outer level, why is the third case consuming more space? That could be due to the inner page table not being able to fit completely on a single page. I am still not completely sure. 1 votes 1 votes Please log in or register to add a comment.