3 votes 3 votes Determine the number of page faults when references to pages occur in the order $1,2,4,5,2,1,2,4.$ Assume that the main memory can accommodate $3$ pages and the main memory already has the pages $1$ and $2,$ with page $1$ brought earlier than page $2.$ (assume LRU i.e., Least-Recently-Used algorithm is applied) $3$ $4$ $5$ None of the above Operating System isro2018 operating-system page-replacement + – srestha asked Apr 22, 2018 recategorized Dec 31, 2019 by Arjun srestha 2.7k views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply Akshay Koli 4 commented Apr 22, 2018 reply Follow Share sorry bro my bad...option B is correct 0 votes 0 votes Akash Papnai commented Jan 6, 2020 reply Follow Share Why the answer is D? I think it should be B as it is given that 1,2 are already present in the main memory. 3 votes 3 votes mrinmoyh commented Jan 9, 2020 reply Follow Share ans should be 4. page fault at 4,5,1,4 0 votes 0 votes air1ankit commented Jan 9, 2020 reply Follow Share @MRINMOY_HALDER I am getting same 0 votes 0 votes Please log in or register to add a comment.
4 votes 4 votes Option B. 4 page faults will happen. 1(hit), 2(hit), 4(miss), 5(miss), 2(hit), 1(miss), 2(hit), 4(miss). Akhilesh Singla answered Apr 22, 2018 Akhilesh Singla comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes Answer is (B) 4 jjayantamahata answered Apr 22, 2018 jjayantamahata comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes The main memory already has the pages $1$ and $2$, with page $1$ brought earlier than page $2.$ It means $1,2$ is ${\color{Magenta}{\textbf{not}}}$ a page fault. $1,2,4,5,2,1,2,4.$ Using LRU(Least - Recently - Used) algorithm we got $4$ page faults. So, the correct answer is $(B).$ Lakshman Bhaiya answered Jan 10, 2020 Lakshman Bhaiya comment Share Follow See all 2 Comments See all 2 2 Comments reply CSHuB commented Jan 11, 2020 reply Follow Share Nice. how you made this figure? I mean Latex or paintbrush? 0 votes 0 votes Lakshman Bhaiya commented Jan 11, 2020 reply Follow Share Microsoft paint. 0 votes 0 votes Please log in or register to add a comment.