C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
GATE 2015 question on LRU and FIFOQ. Consider a main memory with five page frames and the following sequence of page references: 3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3. which one of the following is true with respect to page replacement policies First-In-First-out (FIFO) and Least Recently Used (LRU)?A. Both incur the same number of page faults Solution: Number of frames = 5 FIFOAccording to FIFO, the page which first comes in the memory will first goes out. Number of Page Faults = 9 LRUAccording to LRU, the page which has not been requested for a long time will get replaced with the new one. Number of Page Faults = 9 The Number of page faults in both the cases is equal therefore the Answer is option (A).
Next TopicNumerical on LRU, FIFO and Optimal
|