CS FundamentalsModerateTCS NQT · Infosys interview pattern
Reference string: 1, 3, 0, 3, 5, 6, 3, 1, 0, 6, 5, 3. With 3 frames, initially empty, how many page faults does FIFO replacement cause?
- A. 10
- B. 9
- C. 11
- D. 7
Correct answer: C. 11
FIFO hits only on the second reference (3); every later page has just been evicted when it returns: faults at 1, 3, 0, 5, 6, 3, 1, 0, 6, 5, 3 = 11. 7 is the Optimal count for the same string.
More Operating Systems questions
- Pure paging (fixed-size pages and frames) can suffer from which kind of fragmentation?
- The Banker’s algorithm is used for which strategy of handling deadlocks?
- If the time quantum of Round Robin scheduling is made larger than the longest CPU burst of every process, Round Robin behaves like:
- Processes (arrival, burst): P1 (0, 6), P2 (2, 2), P3 (3, 4), P4 (5, 1). Round Robin with quantum 2 is used; a newly arrived process joins…
- Processes (arrival, burst): P1 (0, 8), P2 (1, 4), P3 (2, 2), P4 (3, 5). What is the average waiting time under preemptive SJF (Shortest…
- Reference string: 5, 2, 5, 8, 2, 3, 5, 9, 8, 2, 3, 5. With 3 frames, initially empty, how many page faults does LRU replacement cause?