CS FundamentalsHardGATE CS
Reference string: 1, 3, 5, 4, 2, 4, 3, 2, 1, 0, 5, 3, 5, 0, 4, 3. With 3 frames (initially empty), how many page faults does LRU produce?
- A. 12
- B. 11
- C. 9
- D. 10
Correct answer: A. 12
Track the least recently used page at each fault; LRU gives 12 faults. On this string FIFO actually does better (11), OPT gives 9, and 4-frame LRU gives 10.
More Operating Systems questions
- Reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6. With 4 frames (initially empty), how many page faults does…
- Reference string: 3, 2, 1, 0, 3, 2, 4, 3, 2, 1, 0, 4. How many page faults does FIFO produce with 3 frames and with 4 frames (both…
- Reference string: 4, 5, 2, 3, 4, 2, 3, 2, 1, 3, 5, 4, 1, 0, 3 frames, initially empty. Using the clock (second-chance) algorithm, where a…
- Reference string: 6, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 1, 2, 3 frames, initially empty. After all references are processed under LRU…
- Reference string: 5, 3, 5, 2, 3, 5, 4, 3, 2, 5, 3, 2 with 3 frames under LRU (initially empty). What is the hit ratio?
- Which page-replacement algorithms are stack algorithms (the set of pages in memory with n frames is always a subset of the set with n + 1…