This is in continuation with Q79.
Using FIFO page replacement policy, assume that the page request follows the following order:
3, 2, 1, 0, 3, 2, 4, 3, 2, 1, 0, 4
Question 164: If there are total 4 page frames in the system, how many page faults will be there?
Options:
- 0
- 6
- 9
- 10
Solution: Following will be the sequence of pages in memory, pages in red will be the ones which will be replaced.
| Newest Page | 3 | 2 | 1 | 0 | 0 | 0 | 4 | 3 | 2 | 1 | 0 | 4 |
| 3 | 2 | 1 | 1 | 1 | 0 | 4 | 3 | 2 | 1 | 0 | ||
| 3 | 2 | 2 | 2 | 1 | 0 | 4 | 3 | 2 | 1 | |||
| Oldest Page | 3 | 3 | 3 | 2 | 1 | 0 | 4 | 3 | 2 |
Hence, the correct answer is the last option. This is an example of Belady’s anomaly, that is, increasing number of page frames results in increase in the number of page faults.