To Implement Page Replacement Algorithms

Pre Test

1. Page replacement is an important activity to optimize the memory usage. An Optimal Page Replacement algorithm:

a) always has lowest page fault rate among all algorithms
b) will never suffer from Belady's anomaly
c) difficult to implement as it needs future knowledge of the reference string
d) All of the above

2. What is the primary purpose of page replacement algorithms in virtual memory management?

a) To allocate physical memory
b) To manage I/O devices
c) To decide which pages to keep in memory
d) To allocate CPU time to processes

3. Which page replacement algorithm replaces the page that has not been used for the longest period of time?

a) FIFO (First-In-First-Out)
b) LRU (Least Recently Used)
c) OPT (Optimal Page Replacement)
d) MRU (Most Recently Used)

4. In the FIFO page replacement algorithm, which page is replaced when a page fault occurs?

a) The page that has been in memory the longest
b) The page that has been in memory the shortest
c) The page with the highest page number
d) The page with the lowest page number

5. Which page replacement algorithm selects the page that will not be used for the longest period in the future?

a) FIFO (First-In-First-Out)
b) LRU (Least Recently Used)
c) LFU (Least Frequently Used)
d) OPT (Optimal Page Replacement)