edited by
1,186 views
1 votes
1 votes
Consider a computer system having 20 physical page frames numbered from 1 to 20 which are initially empty. Now, a program accesses the pages numbered 1, 2 ..........100 twice. The number of page fault generated by optimal page replacement policy is __________.
edited by

1 Answer

Best answer
1 votes
1 votes
Initially 1 to 20 will be present (20 page fault)

now 20 will be replaced till end of first scan so at end of first scan we will have

1,2,3...19,100. (80 miss)

now 1 to 19 will be hit and for 20 we will replace 1 and so one

note that 100 will not be replaced as we are using optimal

so from 20 till 99 page fault and for 100 page hit

Total fault : 100+80=180

Total Hit: 20  (for 1,2,..19,100)
selected by

Related questions

0 votes
0 votes
0 answers
3
Jyoti Kumari97 asked Jan 15, 2019
510 views
Assume there are 5 frames and consider the following reference string find the number of page faults using NRU page replacement algorithm.3,2,3, 0,8,4,2,5,0,9,8,3,2