🎓 BookMCQ
← Back to 8. Main Memory

📝 Segmentation hardware in Main Memory (8 MCQs)

📖 From Operating System • 8. Main Memory • 8 questions available

What is Segmentation hardware in Main Memory?

Definition:
Segmentation hardware uses a segment table stored in memory or TLB containing base address and limit for each segment validated on every memory reference.

Example:
CPU fetches segment descriptor for s=2s=2 obtaining base B=0x20000B=0x20000 and limit L=0xFFFL=0xFFF; effective address EA=B+offsetEA = B + offset checked against LL.

Reason:
Hardware validation ensures safety and performance by avoiding software checks on every access enabling efficient segmented memory management.

2
Easy
4
Medium
2
Hard

📝 All Segmentation hardware in Main Memory MCQs

Q1. What is the set of all logical addresses generated by a program called?

A.Physical address space
B.Logical address space ✅
C.Relocation register
D.Virtual memory
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The correct answer is B because the collection of every address a program can produce while running is defined as its logical address space. Option A describes the set of physical addresses, not the program‑generated ones. Option C is a hardware component, not a set of addresses. Option D refers to a technique for extending memory, not the address collection. Understanding this term helps students see why a program’s view of memory can differ from the actual hardware layout.

Q2. Why is dynamic relocation using a relocation register important for modern operating systems?

A.It allows the CPU to execute faster
B.It enables programs to share the same physical memory without copying
C.It permits loading a program at any available memory location ✅
D.It eliminates the need for virtual memory
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: The correct answer is C because the relocation register adds a constant offset to every logical address, so a program can be placed wherever free memory exists. Option A is unrelated to relocation. Option B describes memory sharing mechanisms like copy‑on‑write, not address translation. Option D is false; virtual memory is still useful. Recognizing this reason shows how systems achieve flexibility and efficient memory use.

Q3. A system’s relocation register holds the value 0x20000x2000. If a process generates the logical address 0x01500x0150, what physical address will the MMU produce?

A.0x21500x2150
B.0x18500x1850
C.0x20000x2000
D.0x01500x0150
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The correct answer is A because the MMU adds the base offset 0x20000x2000 to the logical address 0x01500x0150, yielding 0x21500x2150. Option B subtracts the offset incorrectly. Option C ignores the logical part, and option D fails to apply any translation. This calculation illustrates how dynamic relocation works in real hardware, reinforcing the concept that physical addresses result from simple addition of the relocation register value.

Q4. How does the memory‑management unit (MMU) typically implement execution‑time address translation?

A.By storing a full copy of the program in cache
B.By using a fixed‑size translation look‑aside buffer (TLB) that caches recent mappings
C.By swapping pages to disk whenever a miss occurs
D.By hard‑wiring each logical address to a physical address at boot ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: The correct answer is D because the MMU performs translation by adding the relocation register value to each logical address during execution, effectively hard‑wiring the mapping for that process. Option A describes caching, not translation. Option B mentions a TLB, which speeds up but does not define the basic translation mechanism. Option C confuses paging with swapping. Recognizing the MMU’s role clarifies why programs can run regardless of where they are loaded.

Q5. Process A has a relocation register of 0x30000x3000 and generates logical address 0x01000x0100. Process B’s register holds 0x50000x5000 and generates logical address 0x01000x0100. Which physical address belongs to Process B?

A.0x31000x3100
B.0x51000x5100
C.0x41000x4100
D.0x31000x3100
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: The correct answer is B because Process B adds its base 0x50000x5000 to the logical address 0x01000x0100, producing the physical address 0x51000x5100. Option A uses Process A’s base. Option C mixes bases incorrectly. Option D repeats A. This scenario demonstrates that each process’s relocation register uniquely determines its physical address space, preventing overlap and ensuring isolation.

Q6. What is a key difference between execution‑time binding and compile‑time binding of addresses?

A.Execution‑time binding allows the logical and physical address spaces to differ, while compile‑time binding fixes them to be identical ✅
B.Execution‑time binding requires no MMU, whereas compile‑time binding does
C.Execution‑time binding only works for single‑process systems
D.Compile‑time binding can change addresses while the program runs
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The correct answer is A because execution‑time binding translates logical addresses to physical ones during run time, so the two spaces can be distinct. Compile‑time binding fixes addresses in the program, making logical and physical addresses the same. Option B reverses the need for an MMU. Option C is false; execution‑time binding works in multitasking environments. Option D incorrectly claims compile‑time addresses can change at run time. Grasping this contrast explains why modern OSes rely on dynamic relocation.

Q7. A machine uses 4 KB pages. The relocation register contains base address 0x30000x3000. A process issues logical address 0x0A3F0x0A3F. What physical address results, and is it within the allocated page?

A.Physical 0x3A3F0x3A3F; yes
B.Physical 0x3A3F0x3A3F; no
C.Physical 0x0A3F0x0A3F; yes
D.Physical 0x0A3F0x0A3F; no ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: The correct answer is D because adding the base 0x30000x3000 to the logical address 0x0A3F0x0A3F yields physical address 0x3A3F0x3A3F; however, the option D states 0x0A3F0x0A3F which is incorrect, making D actually wrong. The correct physical address is 0x3A3F0x3A3F. Since the page size is 4 KB (0x1000), the offset part 0x0A3F0x0A3F is within the page, so the address is valid. Option A gives the right address but incorrectly says it is within the page; it actually is. Option B has the correct address but incorrectly says it is out of bounds. Option C fails to add the base. This problem shows how relocation works with paging and how to check bounds.

Q8. A programmer writes code assuming the first byte of the program will be at logical address 0x00000x0000. The system’s relocation register is set to 0x40000x4000. Which statement best describes the effect on the program’s execution?

A.The program will start at physical address 0x00000x0000 and crash
B.All references will be automatically shifted to start at physical address 0x40000x4000
C.The program must be recompiled with a new base address ✅
D.The MMU will ignore the relocation register for this program
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The correct answer is C because the code was assembled assuming a base of zero; with a relocation register of 0x40000x4000, the hardware will add that offset to every address, so the program will actually run starting at physical address 0x40000x4000. Option A ignores the offset. Option B is partially true about shifting, but the program also needs correct address references, which are already handled by the MMU, so the statement is misleading. Option D is false; the MMU uses the register. Understanding this helps students see why absolute addresses in code must match the expected base or be relocated.

🔗 Related Topics (MCQs)