ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > zstu-(2021-2022)-1 > student homework directories > 2019529628006_John Nagbe Kofa >
2019529628006_John Nagbe Kofa_Homework 12 Version 0
👤 Author: by meekkofaoutlookcom 2021-12-22 10:32:18
Give an example that illustrates several page-replacement algorithms and compares their page faults.

Answer:

Consider page reference string 1, 3, 0, 3, 5, 6 and 3 page slots.

Initially all slots are empty, so when 1, 3, 0 came they are allocated to the empty slots —> 3 Page Faults.
when 3 comes, it is already in memory so —> 0 Page Faults.
Then 5 comes, it is not available in memory so it replaces the oldest page slot i.e 1. —>1 Page Fault.
Finally 6 comes, it is also not available in memory so it replaces the oldest page slot i.e 3 —>1 Page Fault.

So total page faults = 5.

Another example:

Please login to reply. Login

Reversion History

Loading...
No reversions found.