Memory Management in Operating Systems - 30 MCQs
1. What is the primary purpose of memory management in an operating system?
A) To manage user accounts
B) To manage the CPU
C) To manage the computer's memory resources
D) None of the above
A) To manage user accounts
B) To manage the CPU
C) To manage the computer's memory resources
D) None of the above
Show Answer
Answer: C
2. Which of the following is a type of memory allocation?
A) Static allocation
B) Dynamic allocation
C) Both A and B
D) None of the above
A) Static allocation
B) Dynamic allocation
C) Both A and B
D) None of the above
Show Answer
Answer: C
3. What does paging do in memory management?
A) Divides memory into fixed-size blocks
B) Allocates all memory at once
C) Manages CPU scheduling
D) None of the above
A) Divides memory into fixed-size blocks
B) Allocates all memory at once
C) Manages CPU scheduling
D) None of the above
Show Answer
Answer: A
4. What is virtual memory?
A) A method of extending physical memory using disk space
B) Memory that exists only in a program
C) None of the above
D) Both A and B
A) A method of extending physical memory using disk space
B) Memory that exists only in a program
C) None of the above
D) Both A and B
Show Answer
Answer: A
5. What is the role of a memory manager?
A) To allocate and deallocate memory blocks
B) To monitor CPU usage
C) To schedule processes
D) None of the above
A) To allocate and deallocate memory blocks
B) To monitor CPU usage
C) To schedule processes
D) None of the above
Show Answer
Answer: A
6. What is fragmentation in memory management?
A) Inefficient use of memory
B) Complete memory allocation
C) A method of memory cleanup
D) None of the above
A) Inefficient use of memory
B) Complete memory allocation
C) A method of memory cleanup
D) None of the above
Show Answer
Answer: A
7. What does the term "swap space" refer to?
A) Physical RAM
B) Disk space used for swapping
C) Temporary storage for files
D) None of the above
A) Physical RAM
B) Disk space used for swapping
C) Temporary storage for files
D) None of the above
Show Answer
Answer: B
8. Which of the following is NOT a method of memory allocation?
A) First fit
B) Best fit
C) Round robin
D) Next fit
A) First fit
B) Best fit
C) Round robin
D) Next fit
Show Answer
Answer: C
9. What is a memory leak?
A) A type of memory allocation
B) When allocated memory is not released
C) A method of improving performance
D) None of the above
A) A type of memory allocation
B) When allocated memory is not released
C) A method of improving performance
D) None of the above
Show Answer
Answer: B
10. In which allocation strategy are blocks allocated in the order they are requested?
A) Best fit
B) First fit
C) Next fit
D) Worst fit
A) Best fit
B) First fit
C) Next fit
D) Worst fit
Show Answer
Answer: B
11. What is the main benefit of using virtual memory?
A) Increases the speed of access
B) Allows execution of processes that require more memory than is physically available
C) Reduces memory fragmentation
D) None of the above
A) Increases the speed of access
B) Allows execution of processes that require more memory than is physically available
C) Reduces memory fragmentation
D) None of the above
Show Answer
Answer: B
12. What does "thrashing" refer to in memory management?
A) Excessive paging
B) Efficient memory allocation
C) Deallocation of memory
D) None of the above
A) Excessive paging
B) Efficient memory allocation
C) Deallocation of memory
D) None of the above
Show Answer
Answer: A
13. Which memory management technique is used to avoid fragmentation?
A) Paging
B) Segmentation
C) Both A and B
D) None of the above
A) Paging
B) Segmentation
C) Both A and B
D) None of the above
Show Answer
Answer: C
14. What is segmentation in memory management?
A) Dividing memory into variable-sized segments
B) Fixed-size partitioning
C) A method to allocate memory for files
D) None of the above
A) Dividing memory into variable-sized segments
B) Fixed-size partitioning
C) A method to allocate memory for files
D) None of the above
Show Answer
Answer: A
15. Which of the following is an example of a memory allocation algorithm?
A) First fit
B) Best fit
C) Worst fit
D) All of the above
A) First fit
B) Best fit
C) Worst fit
D) All of the above
Show Answer
Answer: D
16. What is the purpose of memory paging?
A) To manage multiple processes
B) To allow non-contiguous memory allocation
C) To increase CPU speed
D) None of the above
A) To manage multiple processes
B) To allow non-contiguous memory allocation
C) To increase CPU speed
D) None of the above
Show Answer
Answer: B
17. How does the operating system manage memory allocation?
A) By using a memory manager
B) By implementing a queuing system
C) By using interrupts
D) None of the above
A) By using a memory manager
B) By implementing a queuing system
C) By using interrupts
D) None of the above
Show Answer
Answer: A
18. What happens during a page fault?
A) The requested page is already in memory
B) The operating system retrieves the page from disk
C) Memory is deallocated
D) None of the above
A) The requested page is already in memory
B) The operating system retrieves the page from disk
C) Memory is deallocated
D) None of the above
Show Answer
Answer: B
19. What is the role of the page table?
A) To keep track of physical memory
B) To map virtual addresses to physical addresses
C) To manage CPU scheduling
D) None of the above
A) To keep track of physical memory
B) To map virtual addresses to physical addresses
C) To manage CPU scheduling
D) None of the above
Show Answer
Answer: B
20. Which of the following best describes "demand paging"?
A) Loading all pages at startup
B) Loading pages only when they are needed
C) Constantly swapping pages in and out
D) None of the above
A) Loading all pages at startup
B) Loading pages only when they are needed
C) Constantly swapping pages in and out
D) None of the above
Show Answer
Answer: B
21. Which is a common issue related to memory management?
A) Memory leaks
B) Buffer overflows
C) Thrashing
D) All of the above
A) Memory leaks
B) Buffer overflows
C) Thrashing
D) All of the above
Show Answer
Answer: D
22. Which of the following is an advantage of segmentation?
A) Easy implementation
B) Variable-length partitions
C) Fixed-size pages
D) None of the above
A) Easy implementation
B) Variable-length partitions
C) Fixed-size pages
D) None of the above
Show Answer
Answer: B
23. In the context of memory management, what does "address space" refer to?
A) The range of memory addresses available for use
B) The physical location of memory
C) Both A and B
D) None of the above
A) The range of memory addresses available for use
B) The physical location of memory
C) Both A and B
D) None of the above
Show Answer
Answer: A
24. What does "compaction" do in memory management?
A) Reorganizes memory to eliminate fragmentation
B) Allocates memory faster
C) Frees up disk space
D) None of the above
A) Reorganizes memory to eliminate fragmentation
B) Allocates memory faster
C) Frees up disk space
D) None of the above
Show Answer
Answer: A
25. What is the primary disadvantage of dynamic memory allocation?
A) It is inflexible
B) It can lead to fragmentation
C) It is always faster
D) None of the above
A) It is inflexible
B) It can lead to fragmentation
C) It is always faster
D) None of the above
Show Answer
Answer: B
26. What is the function of a heap in memory management?
A) Stores static variables
B) Provides dynamic memory allocation
C) Manages I/O operations
D) None of the above
A) Stores static variables
B) Provides dynamic memory allocation
C) Manages I/O operations
D) None of the above
Show Answer
Answer: B
27. In which memory allocation method does the OS keep track of free memory?
A) Paging
B) Segmentation
C) Both A and B
D) None of the above
A) Paging
B) Segmentation
C) Both A and B
D) None of the above
Show Answer
Answer: C
28. Which memory management technique requires the least overhead?
A) Paging
B) Segmentation
C) Contiguous allocation
D) None of the above
A) Paging
B) Segmentation
C) Contiguous allocation
D) None of the above
Show Answer
Answer: C
29. Which of the following does not cause page faults?
A) A program accessing an unallocated page
B) A program accessing a page that is in memory
C) A program that has terminated
D) None of the above
A) A program accessing an unallocated page
B) A program accessing a page that is in memory
C) A program that has terminated
D) None of the above
Show Answer
Answer: B
30. What is the purpose of a page replacement algorithm?
A) To determine which page to remove from memory
B) To allocate memory to new processes
C) To optimize CPU usage
D) None of the above
A) To determine which page to remove from memory
B) To allocate memory to new processes
C) To optimize CPU usage
D) None of the above
Show Answer
Answer: A
0 Comments