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)
@MRINMOY_HALDER I am getting same
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).$
64.3k questions
77.9k answers
244k comments
80.0k users