Homework - 8 Version 0 |
|
👤 Author: by 244045932qqcom 2019-12-18 06:48:50 |
In Virtual memory management, demostrate one of the page replacement algorithms.
Least Recently Used algorithm is one popular algorithm in page replacement. The core idea is that the frame haven't been accessed of the longest time is replaced with desired frame every time a page fault happen.
Here's an example:
Frame size = 4
Frames Reference String
[0] 0(Page Fault)
[0,3] 3(Page Fault)
[0,3,1] 1(Page Fault)
[0,3,1,8] 8(Page Fault)
[7,3,1,8] 7(Page Fault)
[7,2,1,8] 2(Page Fault)
[7,2,6,8] 6(Page Fault)
[7,2,6,9] 9(Page Fault)
[4,2,6,9] 4(Page Fault)
[4,8,6,9] 8(Page Fault)
[4,8,5,9] 5(Page Fault)
[4,8,5,7] 7(Page Fault)
[1,8,5,7] 1(Page Fault)
[1,2,5,7] 2(Page Fault)
[1,2,4,7] 4(Page Fault)
[1,2,4,7] 7
[1,2,4,7] 2
[5,2,4,7] 5(Page Fault)