Question
In the Least Recently Used (LRU) page replacement
algorithm, given the following reference string 4, 2, 4, 1, 5, 2, 3, 4, and assuming 3 frames, how many page faults will occur?Solution
LRU page replacement works by replacing the page that has not been used for the longest time. For the reference string 4, 2, 4, 1, 5, 2, 3, 4 with 3 frames, the page faults occur as follows: • Insert 4 (fault), Insert 2 (fault), Access 4 (hit), Insert 1 (fault), Insert 5 (fault, replace 4), Access 2 (hit), Insert 3 (fault, replace 1), Access 4 (fault, replace 5). Thus, there are 6 page faults in total. LRU minimizes page faults compared to other algorithms by always keeping the most recently used pages in memory. Why other options are wrong: A) 3 faults would require the reference string to contain repeated pages with no replacements. B) 5 faults underestimate the replacements required after the first few frames fill up. D) 7 faults occur in algorithms with more aggressive replacements like FIFO. E) 8 faults assume no page hits at all, which is incorrect since some pages are reused before replacement.
Which Article defines the powers of Union and States with respect to governor?
For the SHG(Self Help Groups) how much maximum loan amount is provided under DAY -NRLM scheme ?
What was the primary focus of the partnership between LIC and Infosys? Â
What is the class of the 4th Submarine INS Vela ?
IBM in collaboration with NASA unveiled a new geospatial foundation model foe which of the following purposes?
If A is to the South of B and C is to the East of B. In what direction is A with respect to C?
In the 75th year of Independence, in August 2022, 11 New Ramsar Sites in India were added to the list.. Which state in India has the highest number of ...
The memoir ‘Becoming’ is based on whose life events?
Which schedule was added to the constitution by the 73rd Constitutional Amendment?
Kamala Harris, Vice President Elect of USA wrote a children book, what is the name of the book?Â