The Gateway to Computer Science Excellence
+12 votes
877 views

The following page addresses, in the given sequence, were generated by a program:

$\text{1 2 3 4 1 3 5 2 1 5 4 3 2 3}$

This program is run on a demand paged virtual memory system, with main memory size equal to $4$ pages. Indicate the page references for which page faults occur for the following page replacement algorithms.

  1. LRU
  2. FIFO

Assume that the main memory is initially empty

in Operating System by Veteran (52.2k points)
edited by | 877 views

1 Answer

+15 votes
Best answer
LRU :  $1,2,3,4,5,2,4,3,2$
FIFO : $1,2,3,4,5,1,2,3$
by Veteran (60.5k points)
edited by
+9

Also the number of page faults:

LRU: 9

FIFO: 8

+2
$(A)LRU:$ miss rate$=\dfrac{9}{14}$

$(B)FIFO:$ miss rate$=\dfrac{8}{14}$

Related questions

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,648 questions
56,422 answers
195,196 comments
99,860 users