Virtual Memory & Paging MCQs with Answers
What is virtual memory in an operating system?
a) The physical memory used by processes
b) A technique that allows the execution of processes not completely in memory
c) The memory used for disk storage
d) The memory assigned to hardware devices
Which of the following is the main benefit of virtual memory?
a) Faster memory access
b) More efficient memory utilization
c) Simplified memory management
d) Better CPU performance
What is the primary function of paging in virtual memory systems?
a) To manage process scheduling
b) To divide physical memory into fixed-size blocks
c) To store processes in secondary memory
d) To assign more memory to running processes
In virtual memory systems, what is a page fault?
a) When a process finishes its execution
b) When a requested page is not in the main memory
c) When a process requests more memory than available
d) When a process is assigned the wrong page
What is the purpose of a page table in a virtual memory system?
a) To store the data of all running processes
b) To map virtual addresses to physical addresses
c) To keep track of disk space allocation
d) To store process scheduling information
What does the term “page replacement” refer to?
a) Swapping a process out of memory
b) Replacing a page in memory with a page from secondary storage
c) Moving pages between CPU registers
d) Reassigning page table entries
Which of the following is an example of a page replacement algorithm?
a) Round Robin Scheduling
b) FIFO (First In First Out)
c) Round Robin Paging
d) Multi-level Feedback Queue
In a virtual memory system, what happens when a page is swapped in from secondary memory?
a) The page is added to the page table
b) The page is written to the disk
c) The page is loaded into the main memory
d) The page is deleted
What is the main advantage of using paging in virtual memory?
a) It eliminates the need for secondary memory
b) It simplifies memory management by using fixed-size blocks
c) It reduces the amount of physical memory required
d) It improves the speed of memory access
What does the term “thrashing” refer to in virtual memory systems?
a) Swapping processes between memory and disk frequently, causing a slowdown
b) A technique to optimize paging operations
c) The removal of unnecessary pages from memory
d) Allocating more memory to the CPU
Which of the following is a disadvantage of using virtual memory?
a) It requires more CPU cycles
b) It increases the risk of data corruption
c) It limits the size of programs that can run
d) It causes the system to run out of memory
How is virtual memory implemented in most modern operating systems?
a) Using dedicated hardware resources
b) By dividing the memory into multiple partitions
c) By using a combination of hardware and software for memory management
d) By using a single process per CPU core
What is the size of a page in a typical paging system?
a) 512 bytes
b) 4 KB
c) 8 MB
d) 1 GB
Which memory management technique involves dividing memory into fixed-size blocks?
a) Segmentation
b) Paging
c) Dynamic Partitioning
d) Memory Pooling
What is the role of the Translation Lookaside Buffer (TLB) in virtual memory systems?
a) It stores recently accessed pages in the main memory
b) It maps virtual memory to physical memory addresses
c) It manages process scheduling
d) It stores page table entries
Which of the following is true about a segmented memory system compared to a paging system?
a) A segmented memory system divides memory into fixed-size blocks
b) Segmentation allows variable-sized memory blocks
c) Segmentation requires a page table
d) Segmentation is more efficient than paging
What happens when a page fault occurs and there is no space left in memory for the required page?
a) The system crashes
b) The page is loaded into the memory and an existing page is swapped out
c) The page is temporarily stored in secondary storage
d) The operating system reallocates memory from the disk
Which of the following algorithms is commonly used to minimize page faults?
a) LRU (Least Recently Used)
b) FIFO (First In First Out)
c) Random Replacement
d) Banker’s Algorithm
What is the main disadvantage of FIFO (First In First Out) as a page replacement algorithm?
a) It does not efficiently manage memory
b) It can cause a high rate of page faults
c) It always keeps the most frequently used pages
d) It leads to fragmentation
Which of the following is true about a process’s virtual address space?
a) It is always equal to the size of physical memory
b) It can be larger than the available physical memory
c) It is limited to the size of RAM
d) It is always divided into 1 KB blocks
Which of the following techniques helps in reducing the effect of thrashing?
a) Using a better page replacement algorithm
b) Increasing the CPU clock speed
c) Increasing the number of processes in the system
d) Limiting the number of memory accesses
Which part of the system is responsible for swapping pages in and out of memory?
a) The CPU
b) The memory manager
c) The disk manager
d) The cache manager
What is the term for a page table entry that indicates a page is in secondary storage rather than in physical memory?
a) Invalid bit
b) Access bit
c) Present bit
d) Valid bit
What is the primary disadvantage of having small page sizes in a virtual memory system?
a) Increased overhead for managing page tables
b) Increased memory fragmentation
c) Decreased system performance
d) Increased disk access time
Which of the following is not a valid page replacement algorithm?
a) FIFO (First In First Out)
b) LRU (Least Recently Used)
c) Round Robin Scheduling
d) Optimal Replacement
Which technique is used by the operating system to minimize the page fault rate?
a) Dynamic memory allocation
b) Demand paging
c) Pre-paging
d) Memory pooling
What happens during a page fault?
a) A program terminates
b) The page is retrieved from secondary storage into physical memory
c) The process is suspended until sufficient memory is available
d) The operating system allocates more memory to the process
Which of the following best describes the concept of “demand paging”?
a) Pages are loaded into memory when required by the process
b) Pages are loaded into memory before they are needed
c) The entire program is loaded into memory at once
d) Only frequently used pages are loaded into memory