Memory Management MCQ Quiz: Paging, Segmentation and Virtual Memory

Test your knowledge of memory management with 30 MCQs on Paging, Segmentation and Virtual Memory. Prepare for exams with detailed concepts and practical scenarios.

Questions (30)


  1. What is the main purpose of paging in memory management?

    • a) To divide the memory into variable-sized sections
    • b) To divide the memory into fixed-size blocks
    • c) To eliminate external fragmentation
    • d) To optimize cache utilization
    View Answer
    Correct To divide the memory into fixed-size blocks
  2. The table that maps logical page numbers to physical frame numbers is called:

    • a) Segment table
    • b) Page table
    • c) Translation Lookaside Buffer (TLB)
    • d) Memory allocation table
    View Answer
    Correct Page table
  3. A page fault occurs when:

    • a) A page is not found in main memory
    • b) A page table becomes full
    • c) Memory access is denied
    • d) The CPU cache fails to retrieve data
    View Answer
    Correct A page is not found in main memory
  4. Which type of fragmentation is resolved using paging?

    • a) External fragmentation
    • b) Internal fragmentation
    • c) Both internal and external fragmentation
    • d) Fragmentation cannot be resolved by paging
    View Answer
    Correct External fragmentation
  5. The Translation Lookaside Buffer (TLB) is used to:

    • a) Store all pages of a process
    • b) Cache recently used page table entries
    • c) Reduce internal fragmentation
    • d) Allocate memory dynamically
    View Answer
    Correct Cache recently used page table entries
  6. The base and limit registers are used in segmentation to:

    • a) Determine the frame size
    • b) Specify the segment size and starting address
    • c) Optimize page table lookups
    • d) Map virtual memory to physical memory
    View Answer
    Correct Specify the segment size and starting address
  7. Virtual memory allows:

    • a) Programs to run without being completely loaded into physical memory
    • b) The elimination of both internal and external fragmentation
    • c) Physical memory to be expanded dynamically
    • d) CPU registers to directly store large data
    View Answer
    Correct Programs to run without being completely loaded into physical memory
  8. Which replacement algorithm is considered optimal for page replacement?

    • a) Least Recently Used (LRU)
    • b) First In First Out (FIFO)
    • c) Optimal Page Replacement
    • d) Clock Algorithm
    View Answer
    Correct Optimal Page Replacement
  9. A major advantage of virtual memory is:

    • a) Faster CPU access times
    • b) Reduced disk usage
    • c) Increased effective memory size
    • d) Improved cache hit rate
    View Answer
    Correct Increased effective memory size
  10. What does a "dirty bit" indicate in a page table entry?

    • a) Whether a page is currently in use
    • b) Whether a page has been modified since loading into memory
    • c) Whether a page is stored on disk
    • d) Whether a page is shared among processes
    View Answer
    Correct Whether a page has been modified since loading into memory
  11. Page size in a paging system is determined by:

    • a) The size of the program
    • b) Hardware and operating system configuration
    • c) The size of the TLB
    • d) The number of page faults
    View Answer
    Correct Hardware and operating system configuration
  12. Which memory management technique is used to reduce page faults?

    • a) Increasing the TLB size
    • b) Effective page replacement algorithms
    • c) Reducing the size of physical memory
    • d) Random memory allocation
    View Answer
    Correct Effective page replacement algorithms
  13. Internal fragmentation in paging occurs because:

    • a) Pages are not fully utilized
    • b) Memory allocation is non-contiguous
    • c) Segments are larger than needed
    • d) TLB miss rate is high
    View Answer
    Correct Pages are not fully utilized
  14. What happens when a process tries to access a memory location outside its segment bounds?

    • a) A page fault occurs
    • b) A segmentation fault occurs
    • c) The memory is reallocated dynamically
    • d) The process continues execution without interruption
    View Answer
    Correct A segmentation fault occurs
  15. The purpose of demand paging is to:

    • a) Load only required pages into memory when needed
    • b) Preload all pages before program execution
    • c) Eliminate the use of virtual memory
    • d) Prevent page faults during execution
    View Answer
    Correct Load only required pages into memory when needed
  16. Which replacement algorithm may suffer from the "Belady's anomaly"?

    • a) Least Recently Used (LRU)
    • b) Optimal Page Replacement
    • c) First In First Out (FIFO)
    • d) Clock Algorithm
    View Answer
    Correct First In First Out (FIFO)
  17. The concept of a "working set" in memory management refers to:

    • a) The most recently accessed pages of a process
    • b) The set of pages that a process needs during a specific time interval
    • c) Pages currently residing in secondary storage
    • d) Pages allocated to the operating system kernel
    View Answer
    Correct The set of pages that a process needs during a specific time interval
  18. Thrashing occurs when:

    • a) The CPU is underutilized
    • b) Processes are frequently moved between memory and disk due to high page faults
    • c) The TLB fails to cache page table entries
    • d) The system runs out of memory completely
    View Answer
    Correct Processes are frequently moved between memory and disk due to high page faults
  19. Which hardware component is necessary for implementing paging?

    • a) Segment table
    • b) Page table
    • c) CPU registers
    • d) Memory cache
    View Answer
    Correct Page table
  20. What is the role of a page fault handler?

    • a) To clear unused memory
    • b) To bring the required page into memory from disk
    • c) To allocate more memory to the process
    • d) To optimize TLB performance
    View Answer
    Correct To bring the required page into memory from disk
  21. What is the effect of increasing page size in a paging system?

    • a) Decreased internal fragmentation
    • b) Increased page faults
    • c) Increased TLB hits
    • d) Increased internal fragmentation
    View Answer
    Correct Increased internal fragmentation
  22. Segmentation is particularly useful for:

    • a) Programs with variable-sized memory requirements
    • b) Reducing internal fragmentation
    • c) Increasing disk I/O speed
    • d) Replacing page tables
    View Answer
    Correct Programs with variable-sized memory requirements
  23. Which of the following is a valid segment identifier in a segmentation system?

    • a) Page number
    • b) Frame number
    • c) Segment number
    • d) Memory offset
    View Answer
    Correct Segment number
  24. Paging and segmentation can be combined to:

    • a) Reduce memory access time
    • b) Eliminate the need for a page table
    • c) Provide flexibility in memory allocation
    • d) Avoid virtual memory altogether
    View Answer
    Correct Provide flexibility in memory allocation
  25. The primary function of the memory management unit (MMU) is to:

    • a) Allocate memory to processes
    • b) Map virtual addresses to physical addresses
    • c) Optimize CPU usage
    • d) Manage secondary storage
    View Answer
    Correct Map virtual addresses to physical addresses
  26. The Clock algorithm for page replacement improves upon:

    • a) FIFO by adding a use bit to pages
    • b) LRU by increasing page reference tracking
    • c) Optimal Page Replacement by preloading pages
    • d) Demand Paging by prioritizing page faults
    View Answer
    Correct FIFO by adding a use bit to pages
  27. Which field in a page table entry indicates whether a page is currently in main memory?

    • a) Dirty bit
    • b) Valid/Invalid bit
    • c) Access bit
    • d) Reference count
    View Answer
    Correct Valid/Invalid bit
  28. Virtual memory size depends on:

    • a) Physical memory size only
    • b) Address space of the CPU
    • c) Page size and frame size
    • d) Cache memory capacity
    View Answer
    Correct Address space of the CPU
  29. Which technique reduces the number of levels in a multi-level page table?

    • a) Hashing
    • b) Demand paging
    • c) TLB caching
    • d) Segmentation
    View Answer
    Correct Hashing
  30. The main drawback of segmentation compared to paging is:

    • a) Increased internal fragmentation
    • b) Increased external fragmentation
    • c) Complex page table management
    • d) Reduced virtual memory size
    View Answer
    Correct Increased external fragmentation

Ready to put your knowledge to the test?

Start Exam