Determine the number of page faults when references to pages occur is the order – 1, 2, 4, 5, 2, 1, 2, 4. Assume that the main memory can accommodate 3 pages and the main memory already has the pages 1 and 2, with page 1 having brought earlier than page 2. (assume LRU i.e. Least-Recently-Used algorithm is applied)
Determine the number of page faults when references to pages occur is the order – 1, 2, 4, 5, 2, 1, 2, 4. Assume that the main memory can accommodate 3 pages and the main memory already has the pages 1 and 2, with page 1 having brought earlier than page 2. (assume LRU i.e. Least-Recently-Used algorithm is applied) Correct Answer 4
Concept:
Least Recently Used (LRU) is a page replacement technique that replaces the least recently used page first from the frame in case of a page miss.
Explanation:
Page reference: 1, 2, 4, 5, 2, 1, 2, 4
Page replacement algorithm: Least Recently Used (LRU)
|
Frames |
1 |
1 |
2 |
4 |
5 |
5 |
1 |
|
2 |
2 |
4 |
5 |
2 |
1 |
2 |
|
|
|
4 |
5 |
2 |
1 |
2 |
4 |
|
| M | M | M | M |
LRU = 4 miss = 4-page faults
মোঃ আরিফুল ইসলাম
Feb 20, 2025