CS FundamentalsHardGATE CS (PYQ pattern)
The page reference string is 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6 and 3 frames are available (initially empty). The numbers of page faults under FIFO, LRU and Optimal replacement are respectively:
- A. 16, 15, 11
- B. 16, 14, 11
- C. 15, 15, 12
- D. 17, 15, 10
Correct answer: A. 16, 15, 11
Simulating the string gives FIFO = 16, LRU = 15 and Optimal = 11 faults. Optimal is the lower bound, and here LRU edges out FIFO only slightly; the string is not a Belady-anomaly case.
More Operating Systems questions
- Five processes arrive with burst times: P1 (arrival 0, burst 8), P2 (1, 4), P3 (2, 9), P4 (3, 5), P5 (4, 2). Under preemptive SJF (SRTF)…
- A system has 3 resource types and processes P0-P3. Allocation: P0 (1,0,1), P1 (2,1,0), P2 (1,1,1), P3 (0,1,2). Maximum: P0 (3,2,2), P1…
- A paged system has a TLB lookup time of 10 ns, a TLB hit ratio of 90% and a memory access time of 100 ns. A TLB miss needs one extra…
- Semaphores S = 0 and T = 0 are shared. P1 executes: print A; signal(S); print B. P2 executes: wait(S); print C; signal(T). P3 executes…
- A Unix-style inode has 12 direct pointers, one single-indirect and one double-indirect pointer. Block size is 2 KB and a block pointer is…
- A process with pages numbered 0 to 4 references them in the order 0 4 0 1 3 4 0 1 4 0 2 0 4 1 3 2. Under FIFO replacement with initially…