0
917views
memory has 3 pages and the processor required pages from virtual memory in the following order.2,3,2,1,5,2,4,5,3,2,5,2.Show the implementation of FIFO,LRU.
1 Answer
written 2.0 years ago by |
The given string - 2, 3, 2, 1, 5, 2, 4, 5, 3, 2, 5, 2
The page size - 3
String | 2 | 3 | 2 | 1 | 5 | 2 | 4 | 5 | 3 | 2 | 5 | 2 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Frame 3 | 1 | 1 | 1 | 4 | 4 | 4 | 2 | |||||
Frame 2 | 3 | 3 | 3 | 2 | 2 | 2 | 5 | 5 | ||||
Frame 1 | 2 | 2 | 2 | 5 | 5 | 5 | 3 | 3 | 3 | |||
Miss/Hit | M | M | H | M | M | M | M | H | M | H | M | M |
Page Faults = 9
String | 2 | 3 | 2 | 1 | 5 | 2 | 4 | 5 | 3 | 2 | 5 | 2 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Frame 3 | 1 | 1 | 4 | 4 | 2 | |||||||
Frame 2 | 3 | 3 | 5 | 5 | 5 | 5 | ||||||
Frame 1 | 2 | 2 | 2 | 2 | 2 | 3 | 3 | |||||
Miss/Hit | M | M | H | M | M | H | M | H | M | M | H | H |
Page Faults = 7