The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+1 vote
87 views

A system uses optimal policy for a page replacement. It has 4 page frames with no pages loaded to begin with. Consider the following scenario
Case-1: System first accesses 200 distinct pages in sequential order and then access same 200 distinct pages in same order.
Case-2: System first accesses 200 distinct pages in sequential order and then access same 200 distinct page in reverse order.
The difference in the number of faults occurred in both case are _________.

asked in Operating System by (23 points) | 87 views
0
i think in both cases we will gate same number of PF
0
Yes, but how?

Can you please elaborate.
+1

Case:- 1...

here 1 to 4 (4PF)...after then....now we will repalce 4 ,5,6,7.....so on(becz upcoming element would be farthest than present 1,2,3...after servicing 0f 200 pages...remaining pages in PM would be 1,2,3,200...as we start from second loop 1,2,3 hit and then we will repalce 1,2,3,4,5,6..so on and 200 remain as it is becoz it is upcoming request.....therefor total 4 hit(1,2,3,200)...means (400-4=396PF)...

Case:- Same....u can imagine

1 Answer

+1 vote
answered by Active (1k points)

Related questions

+1 vote
1 answer
4
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,049 questions
53,194 answers
184,527 comments
70,400 users