13 votes 13 votes In the context of operating systems, which of the following statements is/are correct with respect to paging? Paging helps solve the issue of external fragmentation Page size has no impact on internal fragmentation Paging incurs memory overheads Multi-level paging is necessary to support pages of different sizes Operating System gatecse-2021-set1 multiple-selects operating-system page-replacement 1-mark + – Arjun asked Feb 18, 2021 • retagged Nov 30, 2022 by Lakshman Bhaiya Arjun 13.0k views answer comment Share Follow See 1 comment See all 1 1 comment reply Vishnu__ commented Jul 7, 2022 reply Follow Share External Fragmentation can be resolved by two techniques- → Compaction and Non-Contagious Memory Partition (Paging). So Paging solves External Fragmentation. But it suffers from Internal Fragmentation (as it follows fixed partition mechanism). Paging consumes memory for storing the page-tables, so memory overhead. Multi-level paging is done to reduce the innerpage table size. So answer is (A) and (C). 6 votes 6 votes Please log in or register to add a comment.
Best answer 11 votes 11 votes Pages are divided into fixed size slots , so no external fragmentation But applications smaller than page size cause internal fragmentation Page tables take extra pages in memory. Therefore incur extra cost Correct ans A and C Meetdoshi90 answered Feb 18, 2021 • selected Jun 13, 2021 by gatecse Meetdoshi90 comment Share Follow See all 9 Comments See all 9 9 Comments reply Arjun commented Feb 19, 2021 reply Follow Share Why is D wrong? 2 votes 2 votes Deepak Poonia commented Feb 19, 2021 i edited by Deepak Poonia Feb 19, 2021 reply Follow Share Page tables (at different levels) can have different sizes in Multilevel paging. But Pages must always be of same size in Paging. In paging, Size of page = Size of frame. 14 votes 14 votes Arjun commented Feb 19, 2021 reply Follow Share Whats pure paging? 0 votes 0 votes Deepak Poonia commented Feb 19, 2021 reply Follow Share I wanted to say “without any segmentation”. I have corrected it. 0 votes 0 votes Meetdoshi90 commented Feb 19, 2021 reply Follow Share The basis of paging is to remove external fragmentation. if we use multiple sized pages then it will be as bad as segmentation. So I've never heard different page size ever used anywhere 0 votes 0 votes Nikhil_dhama commented Feb 19, 2021 reply Follow Share Sir, lets say we divide the VAS into segments, and we divide different segment into pages of different sizes(keeping size of page for a single segment same) using only one lvl of paging.. conventionally this will be segmented paging, will we consider this kind of organisation at multi-lvl paging? if not, then D is not correct! 1 votes 1 votes Arjun commented Feb 19, 2021 reply Follow Share Do we have different page sizes in x86 machines? 1 votes 1 votes wander commented Feb 19, 2021 i edited by wander Feb 19, 2021 reply Follow Share https://stackoverflow.com/a/60348716 From the above ref, Is it possible (and used in any known relevant OS) that one process does have multiple page frame sizes? Yes, It's relatively common for 64-bit 80x86 where there's 4 KiB pages, 2 MiB (or 4 MiB) "large pages" (plus maybe 1 GiB "huge pages"); and done to reduce the chance of TLB misses (while also reducing memory consumed by page tables). Note that this is mostly an artifact of having multiple levels of page tables - an entry in a higher level table can say "this entry is a large page" or it can say "this entry is a lower level page table that might contain smaller pages". Note that in this case it's not "multiple page sizes in the same table", but is "fixed page size for each level". 1 votes 1 votes svmk_18 commented Feb 8 reply Follow Share Page size is for the system, not the program. If segment 1 is divided into 2KB pages, then segment 2 will also be divided into 2 KB pages, otherwise we won't be able to implement the paging concept properly, because the frame size will be same for all pages. 0 votes 0 votes Please log in or register to add a comment.
21 votes 21 votes Pages are of fixed size and hence causes no external fragmentation. So, option A is TRUE. When the required amount of memory for a process is not an exact multiple of page size, internal fragmentation happens. So, option B is FALSE. Paging requires all the pagetables in use to be in main memory which causes memory overhead. So, option C is TRUE. This is slightly debatable. Typically a system allows only pages of a fixed size but $\textsf{x86}$ allows Huge pages or even $\textsf{Transparent Huge Pages}$ of size even $1\;\text{GB}$ (typically $2\;\text{MB})$ which can drastically increase the $\text{TLB}$ hit rate for processes needing large amount of memory. And this usage of multiple size of pages is typically handled using multi-level paging. Since there is no strict requirement of multiple levels of page tables to support multiple page sizes (though its not theoretically required I do not know of any such system) this option is FALSE due to the presence of “necessary” Correct Answer: A;C. Arjun answered Jun 13, 2021 Arjun comment Share Follow See 1 comment See all 1 1 comment reply Aashay kaurav commented Nov 28, 2021 reply Follow Share Sir , For option b if I say pages of muliple sizes can be a possible solution to avoid internal fragmentation to some extent then would it be true ?? 0 votes 0 votes Please log in or register to add a comment.
4 votes 4 votes Paging is the technique of non contiguous allocation of physical memory which solves external fragmentation. Paging may cause internal fragmentation depends on the page size and process size in last page, if page size is larger and process size is smaller. Implementation of Paging requires management of Page tables which resides in pages and hence consume additional memory. Multilevel paging is required when size of page table exceeds the size of page. Since page table reside in page, it is further divided to pages of same size. With these reasoning $A$ and $C$ is correct Ashwani Kumar 2 answered Feb 19, 2021 Ashwani Kumar 2 comment Share Follow See all 0 reply Please log in or register to add a comment.