Page loaded first Most recently loaded page Time 0 3 7 8 12 14 15 18 Fig. 1 Fig.
ID: 3736869 • Letter: P
Question
Page loaded first Most recently loaded page Time 0 3 7 8 12 14 15 18 Fig. 1 Fig. 1 shows a linked list for memory management. The reference bit for these eight pages is 1, 1, 1, 1, 0, 0, o, 0, correspondingly (1) Assume the second chance page replacement is used. Which page will be replaced by new page I when 1. page fault occurs? Answer Updated linked list is (2) Assume FIFO page replacement is used. Which page will be replaced by new page I when page fault occurs? Answer Updated linked list isExplanation / Answer
(1) In second chance page replacement algorithm:
Here we have been given the list as:
pages: A -- B -- C -- D -- E -- F -- G -- H {where A came first and H last}
ref no.: 1 1 1 1 0 0 0 0
now when the new page I comes then the first came page A should be replaced but its reference no. is 1 so next page with reference 0 will be replaced and i.e. E so E will be replaced and references of A, B, C, D will be changed to 0 the list will be:
pages: A -- B -- C -- D -- I -- F -- G -- H
ref no.: 0 0 0 0 0 0 0 0
(b)In simple or say plane FIFO whenever the page fault occurs we just replace it with the new page, we don't see its reference bit. Here initially the list is:
pages: A -- B -- C -- D -- E -- F -- G -- H
now when page I comes then the page which was inserted first will be replaced i.e. A, therefore the final list will be :
pages: I -- B -- C -- D -- E -- F -- G -- H
//If you have any doubt regarding the answer please ask in the comment section
//Please upvote
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.