Consider two primitive memory virtualization schemes for representing the address space of a process: Scheme #1: Single
Question:
Consider two primitive memory virtualization schemes for representing the address space of a process:
Scheme #1: Single Segment
Manages the address space of a process using a single set of base and bounds registers to provide address translation for a unified program address space containing the code, stack, and heap virtual memory addresses. The unified address space is stored with a minimum 4KB size, and can grow in 4KB increments.
Scheme #2: Multiple Segments for Code, Stack, Heap
Manages the address space of a program using segmentation, where the code, stack, and heap of a process are stored as independent segments in physical memory. Three sets of base and bound registers are used to support address translation. Segment sizes are managed in 1 KB increments.
For these two schemes, assuming code, stack, and heap segments are of identical size, answer the following questions considering that registers are 8-bytes (64-bits) each, and that 1KB = 1,000 bytes.
To store a user program with code, stack, and heap segments of 5KB each, which scheme is more space efficient?
To store a user program with code, stack, and heap segments of 5.2KB each, which scheme is more space efficient?