509 views

1 Answer

Best answer
2 votes
2 votes

My definition about LRU is Replace the page which one is Long-ago Used

1) no.of pages already loaded in the memory

              given reference string is 1,2,4,5,6,1,2,3..... using demand-paging said  that already two pages brought in main memory 1 ,2 and 1 is brought before 2

          then

           in the reference string very first 1 and 2 are hits but not the page faults 

2) which page is long-ago used

            given reference string is 1,2,4,5,6,1,2,3..... think each reference is in different month first 1 is in jan, first 2 is in feb, 4 is in mar, 5 is in apr, 6 is in may, second 1 is June , second 2 is in July etc... if a hit occurs consider the page respective month is updated to new one ( 1 is June and 2 is July in this example ). if a page fault occurs replace the page with which have long-ago referred...

selected by

Related questions

132
views
0 answers
1 votes
Reetu Chaudhary asked May 6
132 views
For a certain page trace starting with no page in the memory, a demand-paged memory system operated under the LRU replacement policy results in 9 and 11 page faults when the primary memory ... a) 9 and 7(b) 7 and 9(c) 10 and 12(d) 6 and 7
11.4k
views
4 answers
23 votes
admin asked Feb 15, 2023
11,432 views
Consider the following two-dimensional array $\text{D}$ in the $\text{C}$ programming language, which is stored in row-major order:int D[128] ... number of page faults generated during the execution of this code snippet is _______________.
584
views
1 answers
2 votes
admin asked Dec 15, 2022
584 views
Compute the hit rate and miss/fault rate in least recently used page replacement algorithm for the given reference string with $4$ page frames. String: $7 \; 0 \; 1 \; 2 \; 0 \; 3 \; 4 \; 2 \; 3 \; 0 \; 3 \; 2 \; 1 \; 2 \; 0 \; 1$
1.0k
views
2 answers
0 votes
admin asked Mar 31, 2020
1,012 views
Determine the number of page faults when references to pages occur in the following order: $1,2,4,5,2,1,2,4$. Assume that the main memory can accommodate $3$ pages ... earlier than page $2$.(LRU algorithm is used).$3$5$4$None of these.