recategorized by
2,262 views
0 votes
0 votes

​​​​​​​Suppose for a process $P$, reference to pages in order are $1, 2, 4, 5, 2, 1, 2, 4$. Assume that main memory can accomodate $3$ pages and the main memory has already $1$ and $2$ in the order $1$ – first, $2$ – second. At this moment, assume FIFO Page Replacement Algorithm is used then the number of page faults that occur to complete the execution of process $P$ is

  1. $4$
  2. $3$
  3. $5$
  4. $6$
recategorized by

1 Answer

0 votes
0 votes
Initially,   $1|2$

The requests are :

$1\rightarrow 1|2$

$2\rightarrow 1|2$

$4\rightarrow 1|2|4,\,\, Page fault=1$

$5\rightarrow 2|4|5,\,\, Page fault=2$

$2\rightarrow 2|4|5,\,\, Page fault=2$

$1\rightarrow 4|5|1,\,\, Page fault=3$

$2\rightarrow 5|1|2,\,\, Page fault=4$

$4\rightarrow 1|2|4,\,\, Page fault=5$

So, $(C)$ should be the answer

Related questions

3 votes
3 votes
1 answer
1
2 votes
2 votes
1 answer
2