0
3.3kviews
Calculate hit ad miss percentage for the following string using page replacement policies FIFO, LRU and Optimal. Compare it for the frame size 2 and 4.

2 0 3 0 4 2 3 0 3 2 7 2 0 7 5 0 7 5 7 0

Subject: Operating System

Topic: Memory Management

Difficulty: Low

1 Answer
0
128views

Sequence 2 0 3 0 4 2 3 0 3 2 7 2 0 7 5 0 7 5 7 0
Frame size 2

FIFO Page Replacement Algorithm
FIFO

No of hits = 7
Miss (Page fault) = 13

LRU Page Replacement Algorithm
LRU

No of hits = 7
Miss (Page fault) = 13

Optimal Page Replacement Algorithm
Optimal

No of hits = 7
Miss (Page fault) = 13


Frame size 4

FIFO Page Replacement Algorithm
FIFO

No of hits = 12
Miss (Page fault) = 8

LRU Page Replacement Algorithm
LRU

No of hits = 12
Miss (Page fault) = 8

Optimal Page Replacement Algorithm
Optimal

No of hits = 12
Miss (Page fault) = 8


Comparing the same sequence with different frame size i.e. 2 and 4
We have found that as we increase the frame size from 2 to 4 Page fault decreased from 13 to 8

Please log in to add an answer.