You have devised a new page-replacement algorithm that you think may be optimal.
ID: 3720134 • Letter: Y
Question
You have devised a new page-replacement algorithm that you think may be optimal. In some test cases, Belady’s anomaly occurs. Is the new algorithm optimal? Explain your answer.
Segmentation is similar to paging but uses variable-sized “pages”.
Define two segment-replacement algorithms based on FIFO and LRU page-replacement schemes for segmentation. Remember that since segments are not the same size, the segment that is chosen to be replaced may not be big enough to leave enough consecutive locations for the needed segment. Consider strategies for systems where segments cannot be relocated, and those for systems where they can.
Explanation / Answer
ANS:-
No,an optimal algorithm will not suffer from belady's anomaly beacauge-by defination - an optimal algorithm replaces the page that will not be used for the longest time. belady's anomaly occurs when a page replacement algorithm evicts a page that will be needed in the immediate future. an optimal algorithm would not have selected such a page.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.