Computer Organization Questions and Answers – Replacement Algorithms

This set of Computer Organization and Architecture Multiple Choice Questions & Answers (MCQs) focuses on “Replacement Algorithms”.

1. The directly mapped cache no replacement algorithm is required.
a) True
b) False
View Answer

Answer: a
Explanation: The position of each block is pre-determined in the direct mapped cache, hence no need for replacement.

2. The surroundings of the recently accessed block is called as ______
a) Neighborhood
b) Neighbour
c) Locality of reference
d) None of the mentioned
View Answer

Answer: c
Explanation: The locality of reference is a key factor in many of the replacement algorithms.

3. In set associative and associative mapping there exists less flexibility.
a) True
b) False
View Answer

Answer: b
Explanation: The above two methods of mapping the decision of which block to be removed rests with the cache controller.
advertisement
advertisement

4. The algorithm which replaces the block which has not been referenced for a while is called _____
a) LRU
b) ORF
c) Direct
d) Both LRU and ORF
View Answer

Answer: a
Explanation: LRU stands for Least Recently Used first.

5. In associative mapping during LRU, the counter of the new block is set to ‘0’ and all the others are incremented by one when _____ occurs.
a) Delay
b) Miss
c) Hit
d) Delayed hit
View Answer

Answer: b
Explanation: Miss usually occurs when the memory block required is not present in the cache.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. The LRU provides very bad performance when it comes to _________
a) Blocks being accessed is sequential
b) When the blocks are randomised
c) When the consecutive blocks accessed are in the extremes
d) None of the mentioned
View Answer

Answer: a
Explanation: The LRU in case of the sequential blocks as to waste its one cycle just incrementing the counters.

7. The algorithm which removes the recently used page first is ________
a) LRU
b) MRU
c) OFM
d) None of the mentioned
View Answer

Answer: b
Explanation: In MRU it is assumed that the page accessed now is less likely to be accessed again.
advertisement

8. The LRU can be improved by providing a little randomness in the access.
a) True
b) False
View Answer

Answer: a
Explanation: None.

9. In LRU, the referenced blocks counter is set to’0′ and that of the previous blocks are incremented by one and others remain same, in the case of ______
a) Hit
b) Miss
c) Delay
d) None of the mentioned
View Answer

Answer: a
Explanation: If the referenced block is present in the memory it is called as a hit.
advertisement

10. The counter that keeps track of how many times a block is most likely used is _______
a) Count
b) Reference counter
c) Use counter
d) Probable counter
View Answer

Answer: b
Explanation: None.

Sanfoundry Global Education & Learning Series – Computer Organisation and Architecture.

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.