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

asked in Operating System by Active (2.3k points) | 363 views

1 Answer

+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

answered by Boss (25.9k points)
selected by
+3
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
0
awesome (y)

Related questions

+1 vote
1 answer
5
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
49,411 questions
53,594 answers
185,831 comments
70,878 users