in Operating System
754 views
1 vote
1 vote

in Operating System
754 views

1 Answer

4 votes
4 votes
Best answer

Take Small example.

8 distinct pages={1,2,3,4,5,6,7,8} and having 3 page frames.

A. In same order

Seq 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
f0 1 1 1 1 1 1 1 1 1 1 3 3 5 5 7 7
f1   2 2 2 2 2 2 2 2 2 2 4 4 6 6 6
f2     3 4 5 6 7 8 8 8 8 8 8 8 8 8

In this table 1 2 and 8 are hit that is in bold and italic. 

here first access sequence no hits from second access sequence n-1 hit at starting and only 1 hit at last page reference = n hits here n is num.of frames

B. In reverse Order

Seq 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1
f0 1 1 1 4 4 4 7 7 7 7 7          
f1   2 2 2 5 5 5 8 8 8 8          
f2     3 3 3 6 6 6 6 6 6          

Here 8  7 and 6 are hits which are in bold and italic 

Here no hits in first access sequence but in second access sequence first n frames are hits and other are miss .

So ans should be=0

selected by

2 Comments

Nice ...

So Here according to ur explanation..

400 page reference are there in both cases and each case have 4 hit so both case have 396 miss

So cas1- case2 =396-396 = 0 is Ans

Ri8 @Gabbar Jeee
3
3
awesome (y)
0
0

Related questions