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:
Reference to pages: 4, 7, 6, 1, 7, 6, 1, 2, 7, 2.
Page 1 and 2 are present in order: 1 and 2 in page frame:
4
|
7
|
6
|
1
|
7
|
6
|
1
|
2
|
7 |
2 |
4
|
4
|
4
|
1
|
1
|
1
|
1
|
2
|
7 |
7 |
|
7
|
7
|
7
|
7
|
7
|
7
|
1
|
2 |
2 |
|
|
6
|
6
|
6
|
6
|
6
|
6
|
1 |
1 |
M
|
M
|
M
|
M
|
H
|
H
|
H
|
M
|
M |
H |
Miss = page fault = 6
Important Points
M → miss
H → hit