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.
What is the total dividend paid by LIC to the Government of India for the financial year 2023-24?
Which international financial initiative aims to mobilize $1 billion over the next decade for tiger landscape conservation across Asia?
Recently PM Modi inaugurated how many Pradhan Mantri Kisan Samruddhi Kendras?
Which film earned Leonardo DiCaprio the title of TIME’s 2025 Entertainer of the Year?
 The GDP (Gross Domestic Product) comes under which ministry?
Which state’s police was honoured with the ‘President’s Colour Award’?
Who took on the role of Secretary General of BIMSTEC for the next three years, beginning in January 2024?
The Reserve Bank of India (RBI) approved the re-appointment of _________ as the Managing Director & CEO of Axis Bank for a period of three years.
The 2026 FIDE Freestyle Chess World Championship, won by Magnus Carlsen, was held at which location?
Recently which states govt inks MoUs worth Rs 18,590 cr with UAE based companies?