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.
Two hats are picked at random, what is the probability that all hats are of green colour?
A contains X green Balls, '7 Red Balls, and 5 Yellow Balls. The probability to pick Green Ball at random is 3/5. Another Bag B contains ‘6 green Balls...
A bag contains 9 black and 10 white balls. One ball is drawn at random. What is the probability that the ball drawn is white?
...A bag contains 5 red books, 7 yellow books and 7 green books . 3 books are drawn randomly. What is the probability that the ...
A bag contains 20 white and some black balls. If the probability of drawing a black ball from the bag is 6.25 times that of drawing a white ball, find t...
A bag contains 3 black and 9 white balls. One ball is drawn at random. What is the probability that the ball drawn is white?
...In an examination, there are three sections namely Reasoning, Math, and English. The reasoning part contains 7 questions. There are 4 questions in the m...
A bag contains 6 black and 8 white balls. One ball is drawn at random. What is the probability that the ball drawn is white?
...- A bag contains 2 black balls, 6 red balls, and 10 blue balls. Two balls are drawn at random. Find the probability that the two balls are blue.
- Find the probability of selecting a red card from a deck of well shuffled cards.