Question
In a system using the Least Recently Used (LRU) page
replacement algorithm, which of the following statements holds true?ΒSolution
The Least Recently Used (LRU) page replacement algorithm replaces the page that has not been used for the longest time. It can be implemented efficiently using a hash map and a doubly linked list or queue. The hash map is used to store the pages, and the linked list is used to track the most recently used pages. This ensures O(1) time complexity for both the lookup and replacement operations. Option A (Replaces the page that has been in memory the longest): This is incorrect. LRU replaces the least recently used page, not the one that has been in memory the longest. Option C (Replaces the page that has been accessed the least): LRU doesnβt replace the least accessed page; it replaces the least recently used page. A page could be accessed frequently but not recently. Option D (Causes high page fault rates in large systems): While LRU does result in page faults, it is no worse than other algorithms. In fact, LRU minimizes page faults compared to algorithms like FIFO. Option E (Less efficient than FIFO): LRU is generally more efficient than FIFO as it better tracks page usage history, whereas FIFO might replace a page that is frequently used but just older in the queue.
After selling 15 chairs, a furniture shop earns a profit equivalent to the selling price of 3 tables. While selling 10 tables, the shop earns a profit e...
The sum of the MRP of articles A and B is Rs. 11500. Article B is marked 45% above its cost price and while selling βyβ % discount is given on it. T...
A sold 20% more apples than B. Ratio of number of apples sold by B to number of apples sold by C is 8:9. Find the number of apples sold by A if number o...
Cost price of an article X is Rs. 700 less than that of Y. X and Y are marked 60% and 30% above their cost price respectively. X and Y are sold after al...
Two items, βXβ and βYβ, were sold for Rs. 3200 each. The profit on item βXβ is equal to the loss on item βYβ. If the cost price of item ...
A sum is lent at 20% pa compound interest. What is the ratio of increase in the amount in the 4th year to that in the 5th year?
A positive number becomes 81 times its reciprocal if 10 is added to it. Determine the number.
A shopkeeper marks up the price of an article by 40% on its cost price. He then offers a discount of 10% on the marked price. If the shopkeeper still ma...
Amit purchased an article and marked it 60% above the cost price and sold it after giving a discount of 15% for Rs. 1530. What will be the selling price...
Marked price, selling price and cost price of an article are in the ratio 10:7:5. If difference between marked price and cost price of an article is Rs....