Operating System Questions & Answers – Virtual Memory – Page Replacement Algorithms – 2

This set of Operating System MCQs focuses on “Virtual Memory – Page Replacement Algorithms – 2”.

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
View Answer

Answer: a
Explanation: 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
View Answer

Answer: b
Explanation: 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
View Answer

Answer: b
Explanation: None.
advertisement
advertisement

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
View Answer

Answer: c
Explanation: 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
View Answer

Answer: c
Explanation: 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
View Answer

Answer: b
Explanation: 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
View Answer

Answer: a
Explanation: None.
advertisement

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
View Answer

Answer: a
Explanation: 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
View Answer

Answer: b
Explanation: None.
advertisement

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
View Answer

Answer: c
Explanation: None.

Sanfoundry Global Education & Learning Series – Operating System.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.