Find the difference in the number of page faults between the last-in-first-out page replacement policy and the optimal page replacement policy .

Consider a computer system with ten physical page frames. The system is provided with an access sequence (a1,a2,....,a20,a1,a2,...a20), where each ai is a distinct virtual page number. The difference in the number of page faults between the last-in-first-out page replacement policy and the optimal page replacement policy is_________.

2Comments
Rahul @rahul55523
20 Jul 2017 09:54 am

shivani @shivani1234
21 Jul 2017 12:48 pm
a1
a2
a3
a4
a5
a6
a7
a8
a9
a10/a11/a12.....a20/a10/a11/a12.../a20

so in LIFO 9 hits are there and 31page faults are there.

a1
a2
a3
a4
a5
a6
a7
a8
a9/a10/a11/....a19
a10/a11/a12/.../a20

So in optimal 10 hits are there and 30 page faults are there.
so , difference = 31-30 =1