The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+13 votes
1.3k views

A process, has been allocated 3 page frames. Assume that none of the pages of the process are available in the memory initially. The process makes the following sequence of page references (reference string): 1, 2, 1, 3, 7, 4, 5, 6, 3, 1

If optimal page replacement policy is used, how many page faults occur for the above reference string?

  1. 7
  2. 8
  3. 9
  4. 10
asked in Operating System by Veteran (69k points) | 1.3k views

3 Answers

+11 votes
Best answer
Optimal replacement policy

1     1      1     1     1

2      7      4     5     6

3      3      3     3     3

 For Pages 1 2 3 6 4 5  6 .... 7 page fault occur so ans is a
answered by Veteran (34.3k points)
edited by
for page 1 2 3 7 4 5 6
Please write clearly. total 7 page faults and answer is A.
+4 votes
1 2 1 3 7 4 5 6 3 1

In optimal scheduling we schedule page in place of that page which is not used for scheduling in future .........

If initially memory is empty so 3 page faults

1,2 , (1) ,3 so initially 3 pages are there now - 3 faults

7 in place of (2) because 2 is not in future - 1 fault

4 in place of 7 - 1 fault

5 in place of 4 - 1 fault

6 in place of 5 - 1 fault

so total faults = 3+1+1+1+1 = 7

so option A
answered by Veteran (11.1k points)
–1 vote
82. A)
answered by Active (1.3k points)
Answer:

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

33,646 questions
40,193 answers
114,178 comments
38,665 users