Operating System MCQs on “Virtual Memory – Page Replacement Algorithms”.
1. When using counters to implement LRU, we replace the page with the ____________
a) smallest time value
b) largest time value
c) greatest size
d) none of the mentioned
Answer: a
Clarification: Whenever a reference to a page is made, the contents of the clock register are copied into the time-of-use field in the page-table entry for that page. In this way, we always have the time of the last reference to each page.
2. In the stack implementation of the LRU algorithm, a stack can be maintained in a manner ____________
a) whenever a page is used, it is removed from the stack and put on bottom
b) the bottom of the stack is the LRU page
c) the top of the stack contains the LRU page and all new pages are added to the top
d) none of the mentioned
Answer: b
Clarification: None.
3. There is a set of page replacement algorithms that can never exhibit Belady’s Anomaly, called ____________
a) queue algorithms
b) stack algorithms
c) string algorithms
d) none of the mentioned
Answer: b
Clarification: None.
4. Applying the LRU page replacement to the following reference string.
1 2 4 5 2 1 2 4
The main memory can accommodate 3 pages and it already has pages 1 and 2. Page 1 came in before page 2.
How many page faults will occur?
a) 2
b) 3
c) 4
d) 5
Answer: c
Clarification: None.
5. Increasing the RAM of a computer typically improves performance because ____________
a) Virtual memory increases
b) Larger RAMs are faster
c) Fewer page faults occur
d) None of the mentioned
Answer: c
Clarification: None.
6. The essential content(s) in each entry of a page table is/are ____________
a) Virtual page number
b) Page frame number
c) Both virtual page number and page frame number
d) Access right information
Answer: b
Clarification: None.
7. The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined by ____________
a) the instruction set architecture
b) page size
c) physical memory size
d) number of processes in memory
Answer: a
Clarification: None.
8. What is the reason for using the LFU page replacement algorithm?
a) an actively used page should have a large reference count
b) a less used page has more chances to be used again
c) it is extremely efficient and optimal
d) all of the mentioned
Answer: a
Clarification: None.
9. What is the reason for using the MFU page replacement algorithm?
a) an actively used page should have a large reference count
b) a less used page has more chances to be used again
c) it is extremely efficient and optimal
d) all of the mentioned
Answer: b
Clarification: None.
10. The implementation of the LFU and the MFU algorithm is very uncommon because ____________
a) they are too complicated
b) they are optimal
c) they are expensive
d) all of the mentioned
Answer: c