recategorized by
144 views
2 votes
2 votes
Consider the following page reference string:
$$7, 2, 3, 1, 2, 5, 3, 4, 6, 7,7,1$$
Assume demand paging with three frames, and all frames being initially empty, so the first unique page access cause a page fault.
If $\alpha$ is the number of page faults in optimal page replacement and $\beta$ is the number of page faults in LRU page replacement, the value of $\alpha - \beta$ is _________
recategorized by

1 Answer

1 votes
1 votes
Reference string $:7, 2, 3, 1, 2, 5, 3, 4, 6, 7, 7, 1$

$\textbf{Optimal page replacement:}$

1.$7,2,3-3$ page faults

2.$1,2,3$

3.$1,5,3$

4.$1,5,4$

5.$1,5,6$

6.$1,5,7$

Total $8$ page faults.

$\textbf{LRU:}$

1.$7,2,3-3$ page faults

2.$1,2,3$

3.$1,2,5$

4.$3,2,5$

5.$3,4,5$

6.$3,4,6$

7.$7,4,6$

8.$7,1,6$

Total $10$ page faults.

$\therefore$ The value of $\alpha - \beta = 8 - 10 = -2.$
edited by
Answer:

Related questions