Segmentation vs Paging Quiz Quiz

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.

  1. Logical Division in Memory Management

    Which memory management technique divides a process into variable-sized logical segments such as code, stack, and data segments?

    1. Segmentation
    2. Paging
    3. Framing
    4. Buffering

    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.

  2. Address Translation Differences

    In which technique does the logical address consist of a segment number and an offset, rather than a page number and offset?

    1. Shadowing
    2. Segmentation
    3. Swapping
    4. Paging

    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.

  3. Fragmentation Types

    Which memory management technique is more susceptible to external fragmentation, potentially leaving unused gaps between allocations?

    1. Paging
    2. Merging
    3. Spooling
    4. Segmentation

    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.

  4. Physical Address Space Layout

    In which technique can non-contiguous physical memory be made to appear contiguous in the logical address space using a fixed-size unit?

    1. Segmentation
    2. Mirroring
    3. Paging
    4. Stacking

    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.

  5. Protection and Sharing Features

    Which technique allows for easier enforcement of different access rights (such as read, write, execute) for various logical components of a process?

    1. Caging
    2. Segmentation
    3. Spanning
    4. Paging

    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.