Memory Management MCQs

By: Prof. Dr. Fazal Rehman Shamil | Last updated: September 20, 2024

What is the primary purpose of memory management in an operating system?
A) To prevent hardware failures
B) To allocate and deallocate memory to processes
C) To schedule CPU tasks
D) To manage input/output devices
Answer: B) To allocate and deallocate memory to processes

Which of the following is a key function of memory management?
A) Process synchronization
B) File system management
C) Memory allocation
D) Device management
Answer: C) Memory allocation

In which memory management technique does each process have a separate memory space?
A) Contiguous allocation
B) Segmentation
C) Paging
D) Fragmentation
Answer: B) Segmentation

Which of the following memory allocation schemes allows non-contiguous allocation of memory to processes?
A) Paging
B) Contiguous memory allocation
C) Fixed partitioning
D) Single-user system
Answer: A) Paging

What problem is addressed by the concept of virtual memory?
A) Insufficient CPU speed
B) Limited physical memory
C) Overuse of input/output devices
D) Fragmentation of memory
Answer: B) Limited physical memory

Which type of memory fragmentation occurs when there are small gaps between allocated memory blocks?
A) Internal fragmentation
B) External fragmentation
C) Paging
D) Thrashing
Answer: B) External fragmentation

What is the main goal of the paging memory management technique?
A) To avoid memory fragmentation
B) To allocate large blocks of memory
C) To reduce CPU scheduling time
D) To increase input/output performance
Answer: A) To avoid memory fragmentation

In virtual memory, what is a page fault?
A) When a process exceeds its memory allocation
B) When the operating system crashes
C) When a page is not found in main memory
D) When a process is waiting for I/O
Answer: C) When a page is not found in main memory

Which of the following is an advantage of segmentation over paging?
A) No external fragmentation
B) No internal fragmentation
C) Easier implementation
D) Logical division of program modules
Answer: D) Logical division of program modules

What is the role of the memory management unit (MMU)?
A) To manage input/output operations
B) To handle disk scheduling
C) To map virtual addresses to physical addresses
D) To control access to the CPU
Answer: C) To map virtual addresses to physical addresses

Which of the following is used to reduce the page fault rate?
A) Increasing page size
B) Reducing the number of processes
C) Increasing physical memory
D) Using a smaller swap space
Answer: C) Increasing physical memory

In a paging system, what is the purpose of a page table?
A) To keep track of free memory blocks
B) To map virtual pages to physical frames
C) To manage process synchronization
D) To store file metadata
Answer: B) To map virtual pages to physical frames

What is thrashing in the context of memory management?
A) Excessive swapping of pages in and out of memory
B) A process that crashes due to a lack of memory
C) When the CPU is idle due to memory constraints
D) When memory blocks become fragmented
Answer: A) Excessive swapping of pages in and out of memory

Which type of memory allocation results in internal fragmentation?
A) Fixed partitioning
B) Paging
C) Dynamic partitioning
D) Segmentation
Answer: A) Fixed partitioning

Which of the following best describes demand paging?
A) Loading the entire process into memory at once
B) Swapping processes out of memory when not needed
C) Loading pages into memory only when they are referenced
D) Allocating fixed memory spaces for each process
Answer: C) Loading pages into memory only when they are referenced

What is the primary disadvantage of using large page sizes in a paging system?
A) Increased page table size
B) Higher internal fragmentation
C) More frequent page faults
D) Increased memory access time
Answer: B) Higher internal fragmentation

Which memory allocation method uses variable-sized blocks to minimize wasted memory?
A) Fixed partitioning
B) Segmentation
C) Paging
D) Contiguous allocation
Answer: B) Segmentation

In which memory management technique is a process divided into equal-sized blocks?
A) Segmentation
B) Paging
C) Fixed partitioning
D) Dynamic partitioning
Answer: B) Paging

What is the purpose of a translation lookaside buffer (TLB)?
A) To speed up CPU scheduling
B) To cache page table entries
C) To manage input/output devices
D) To prevent memory fragmentation
Answer: B) To cache page table entries

Which of the following describes external fragmentation?
A) Unused memory within an allocated block
B) Memory that is not allocated to any process
C) Free memory scattered across the system
D) Memory blocks that are too small to allocate
Answer: C) Free memory scattered across the system

Which type of memory allocation requires processes to be stored contiguously in memory?
A) Paging
B) Segmentation
C) Contiguous memory allocation
D) Dynamic memory allocation
Answer: C) Contiguous memory allocation

In a system using paging, what happens when a page table entry is invalid?
A) A page fault occurs
B) The process is terminated
C) The memory is locked
D) The operating system reboots
Answer: A) A page fault occurs

What is the main advantage of dynamic partitioning over fixed partitioning?
A) Better CPU utilization
B) Less external fragmentation
C) No internal fragmentation
D) Increased disk space usage
Answer: C) No internal fragmentation

Which of the following is NOT a benefit of virtual memory?
A) Allows processes to use more memory than physically available
B) Provides process isolation
C) Reduces input/output operations
D) Simplifies memory allocation
Answer: C) Reduces input/output operations

Which of the following best describes a page frame?
A) A logical block of memory
B) A physical block of memory in RAM
C) The size of a process’s virtual memory
D) The size of the operating system’s memory
Answer: B) A physical block of memory in RAM

What is a swap space in the context of virtual memory?
A) A portion of RAM reserved for swapping processes
B) Disk space used to temporarily store pages
C) Space in RAM dedicated to paging
D) Extra cache memory used for storing processes
Answer: B) Disk space used to temporarily store pages

Which of the following is a disadvantage of segmentation?
A) Internal fragmentation
B) Complicated memory access
C) Increased CPU overhead
D) External fragmentation
Answer: D) External fragmentation

In a multi-level page table, what is the purpose of multiple levels?
A) To reduce the size of the page table
B) To increase memory access speed
C) To prevent page faults
D) To allow for larger page sizes
Answer: A) To reduce the size of the page table

What is the main purpose of a memory compaction technique?
A) To increase memory access speed
B) To reduce fragmentation by merging free memory blocks
C) To swap pages in and out of memory
D) To allocate contiguous blocks of memory
Answer: B) To reduce fragmentation by merging free memory blocks

Which of the following algorithms is used to replace pages in memory?
A) First-In-First-Out (FIFO)
B) Round-robin
C) Shortest Job First
D) Mutual exclusion
Answer: A) First-In-First-Out (FIFO)

What happens during memory swapping in operating systems?
A) Processes are moved between RAM and disk
B) Pages are transferred between the CPU and memory
C) The operating system reboots
D) CPU registers are cleared
Answer: A) Processes are moved between RAM and disk

Which of the following can cause thrashing in a system?
A) Too many processes in memory
B) Large page sizes
C) Excessive CPU utilization
D) Insufficient disk space
Answer: A) Too many processes in memory

Which of the following best defines internal fragmentation?
A) Memory wasted inside an allocated block
B) Memory that is unallocated to any process
C) Free memory located between allocated blocks
D) Memory blocks that are too large to allocate
Answer: A) Memory wasted inside an allocated block

Which page replacement algorithm replaces the page that has not been used for the longest period of time?
A) First-In-First-Out (FIFO)
B) Least Recently Used (LRU)
C) Optimal page replacement
D) Random replacement
Answer: B) Least Recently Used (LRU)

In a paging system, what is the purpose of the valid/invalid bit in the page table entry?
A) To check if a page is in memory or on disk
B) To determine if the page is writable
C) To track the size of the page
D) To indicate the age of the page
Answer: A) To check if a page is in memory or on disk

Which of the following is a benefit of using virtual memory?
A) Increased CPU utilization
B) Allows larger processes to run than physical memory allows
C) Reduced complexity in memory management
D) Elimination of page faults
Answer: B) Allows larger processes to run than physical memory allows

What does the term ‘working set’ refer to in memory management?
A) The total memory allocated to a process
B) The set of pages currently in memory that a process is actively using
C) The number of processes that can be swapped into memory
D) The size of the process’s memory space
Answer: B) The set of pages currently in memory that a process is actively using

Which memory management technique allows for memory allocation without dividing memory into fixed-size blocks?
A) Paging
B) Fixed partitioning
C) Dynamic partitioning
D) Contiguous allocation
Answer: C) Dynamic partitioning

What is the primary benefit of using a multi-level page table in a paging system?
A) Reducing memory access time
B) Reducing the size of the page table
C) Increasing page size
D) Preventing page faults
Answer: B) Reducing the size of the page table

Which of the following describes the optimal page replacement algorithm?
A) It replaces the page that will not be used for the longest time in the future
B) It replaces the least recently used page
C) It randomly selects a page to replace
D) It replaces the oldest page in memory
Answer: A) It replaces the page that will not be used for the longest time in the future

In a demand paging system, which of the following occurs when a page is not found in memory?
A) Segmentation fault
B) Page fault
C) System crash
D) Disk read error
Answer: B) Page fault

What is the primary drawback of using a single-level page table in large systems?
A) High memory access time
B) Larger page sizes
C) Limited number of processes
D) High memory overhead
Answer: D) High memory overhead

Which of the following memory management techniques can lead to external fragmentation?
A) Paging
B) Fixed partitioning
C) Segmentation
D) Dynamic partitioning
Answer: C) Segmentation

Read More Computer Architecture MCQs

  1. SET 1: Computer Architecture MCQs
  2. SET 2: Computer Architecture MCQs
  3. SET 3: Computer Architecture MCQs
  4. SET 4: Computer Architecture MCQs
  5. SET 5: Computer Architecture MCQs
  6. SET 6: Computer Architecture MCQs
  7. SET 7: Computer Architecture MCQs
  8. SET 8: Computer Architecture MCQs
  9. SET 9: Computer Architecture MCQs