Explore the differences and similarities between segmentation and paging with this medium-difficulty quiz. Strengthen your understanding of memory management techniques, their uses, structures, and operation in modern operating systems.
Which memory management technique divides a process into variable-sized logical segments such as code, stack, and data segments?
Explanation: Segmentation divides a program into meaningful variable-sized segments that typically map to logical divisions like code, stack, and data. This allows for easier protection and sharing at the segment level. Paging, on the other hand, splits memory into fixed-size pages, ignoring logical divisions. Framing and buffering are not memory management techniques related to dividing a process structure, making those options incorrect.
In which technique does the logical address consist of a segment number and an offset, rather than a page number and offset?
Explanation: Segmentation uses a logical address made up of a segment number and an offset within that segment, reflecting its variable-sized structure. Paging instead consists of a page number and page offset, as all pages are of equal size. Swapping is a memory management method, but it does not define logical address structure. Shadowing is unrelated to address translation methods.
Which memory management technique is more susceptible to external fragmentation, potentially leaving unused gaps between allocations?
Explanation: Segmentation suffers from external fragmentation because variable-sized segments may leave unused memory holes after deallocation. Paging, in contrast, avoids external fragmentation by using fixed-size pages, though it can cause internal fragmentation. Spooling and merging are not memory allocation techniques and do not directly relate to fragmentation, making them incorrect choices.
In which technique can non-contiguous physical memory be made to appear contiguous in the logical address space using a fixed-size unit?
Explanation: Paging maps non-contiguous physical memory to contiguous logical address space by dividing memory into fixed-size pages and frames, making it efficient for managing memory. Segmentation can also create non-contiguous allocations but does so using variable-sized units, not fixed-size pages. Mirroring and stacking are unrelated to memory management in this context and are incorrect.
Which technique allows for easier enforcement of different access rights (such as read, write, execute) for various logical components of a process?
Explanation: Segmentation makes it straightforward to enforce different access permissions per segment, matching the logical structure of programs, such as read-only for code and read-write for data. Paging applies the same protection to all fixed-size pages, which may not align well with logical program divisions. Caging and spanning are not memory management techniques and offer no such protection features.