0
5.1kviews
Calculate hit and miss for the following string using page replacement policies - FIFO, LRU and Optimal. Compare it for the frame size 3 &4.

1 2 3 2 1 5 2 1 6 2 5 6 3 1 3 6 1 2 4 3

Subject: Operating System

Difficulty: Medium

1 Answer
0
281views

Sequence 1 2 3 2 1 5 2 1 6 2 5 6 3 1 3 6 1 2 4 3
Frame Size 3
FIFO Page Replacement Algorithm

FIFO
No of hits = 6
Miss (Page fault) = 14

LRU Page Replacement Algorithm
LRU
No of hits = 6
Miss (Page fault) = 14

Optimal Page Replacement Algorithm
Optimal
No of hits = 6
Miss (Page fault) = 14



Frame Size 4
FIFO Page Replacement Algorithm

FIFO
No of hits = 11
Miss (Page fault) = 9

LRU Page Replacement Algorithm
enter image description here
No of hits = 11
Miss (Page fault) = 9

Optimal Page Replacement Algorithm
enter image description here
No of hits = 11
Miss (Page fault) = 9

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

Please log in to add an answer.