NEOCODE

Advanced Memory Management MCQs

MULTI-LEVEL PAGING & SEGMENTATION WITH PAGING

1. Multi-level paging is used to:

Correct Answer: a) Reduce page table size

Explanation:
Multi-level paging divides the page table into smaller pieces, storing only the actively needed portions in memory, significantly reducing memory usage for page tables.

2. In segmentation with paging, each segment is divided into:

Correct Answer: a) Pages

Explanation:
This hybrid approach first divides memory into logical segments, then further divides each segment into fixed-size pages to combine the benefits of both techniques.

3. Inverted page tables are used to:

Correct Answer: a) Reduce page table size

Explanation:
Inverted page tables maintain one entry per physical frame rather than per virtual page, dramatically reducing table size (especially for 64-bit systems).

4. Which of the following is a hybrid approach?

Correct Answer: c) Segmentation with paging

Explanation:
Segmentation with paging combines logical division (segments) with fixed-size allocation (pages) to get benefits of both approaches while minimizing their drawbacks.

OVERLAYS & SCHEMES

5. Overlays are used when:

Correct Answer: a) Memory is limited

Explanation:
Overlays allow programs larger than physical memory to run by swapping code modules in/out of the same memory region as needed.

6. Overlays are managed by:

Correct Answer: c) User

Explanation:
Unlike modern virtual memory managed by the OS, overlay structures must be explicitly designed by programmers and implemented by compilers.

7. Which scheme allows dynamic loading of programs?

Correct Answer: a) Overlays

Explanation:
Overlays enable dynamic loading by allowing different program modules to occupy the same memory region at different times during execution.

8. The main disadvantage of overlays is:

Correct Answer: a) Increased execution time

Explanation:
Overlays slow down program execution due to frequent swapping of modules between memory and disk, though they enable running larger programs in limited memory.

ADDITIONAL MEMORY MANAGEMENT CONCEPTS

9. Which of the following is not a page replacement algorithm?

Correct Answer: c) MRU

Explanation:
While FIFO (First-In-First-Out) and LRU (Least Recently Used) are standard page replacement algorithms, MRU (Most Recently Used) is not typically used as it would replace actively used pages.

10. In demand paging, a page is loaded when:

Correct Answer: b) It is referenced

Explanation:
Demand paging follows the principle of lazy loading - pages are only brought into memory when they're actually accessed (on first reference), not preemptively.

11. The working set model is used to prevent:

Correct Answer: b) Thrashing

Explanation:
The working set model tracks the set of pages a process is actively using to ensure adequate memory allocation and prevent thrashing (excessive page faults).

12. The TLB (Translation Lookaside Buffer) is used to:

Correct Answer: a) Speed up address translation

Explanation:
The TLB is a special cache that stores recent page table entries to avoid having to access the full page table in memory for every address translation.

13. Which of the following is a non-contiguous allocation technique?

Correct Answer: c) Both a and b

Explanation:
Both paging and segmentation allow a process's memory to be allocated in non-contiguous physical locations, unlike contiguous allocation schemes.

14. The optimal page replacement algorithm is:

Correct Answer: b) Used as a benchmark

Explanation:
The optimal algorithm (OPT) is theoretical since it requires future knowledge of page references, but serves as an ideal standard to compare real algorithms against.

15. In multi-level paging, the page table is:

Correct Answer: b) A hierarchical structure

Explanation:
Multi-level paging creates a tree-like hierarchy of page tables, where outer page tables point to inner page tables, reducing memory usage by only storing active portions.

16. The main advantage of segmentation is:

Correct Answer: b) Logical division of programs

Explanation:
Segmentation mirrors a program's natural structure (functions, arrays, etc.), making it easier to share code/data and implement protection at logical unit boundaries.