CS FundamentalsVery hardGATE CS
Reference string: 1, 2, 3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8, 9, 7, 8, 9, 5, 4, 5, 4, 2. With 4 frames (initially empty), how many page faults do LRU and OPT produce?
- A. LRU 13, OPT 11
- B. LRU 14, OPT 11
- C. LRU 13, OPT 12
- D. LRU 13, OPT 13
Correct answer: A. LRU 13, OPT 11
LRU gives 13 and OPT 11; FIFO also happens to give 13 on this string. OPT can never do worse than LRU on the same string and frame count.
More Operating Systems questions
- Under which condition does the clock (second-chance) algorithm make exactly the same replacement decisions as FIFO?
- A two-level page table, TLB lookup 10 ns, memory 80 ns, TLB hit ratio 90%. On a TLB miss, a page-walk cache holding outer-level entries…
- Two-level paging, TLB lookup 5 ns, memory access 100 ns, TLB searched first. What minimum TLB hit ratio keeps the effective access time at…
- Reference string (times 1–12): 1, 2, 3, 1, 2, 4, 1, 2, 5, 6, 5, 6. With working-set window Δ = 3 (the current and previous two…
- Resources A, B, C, D. Available = (1,5,2,0). Allocation: P0 (0,0,1,2), P1 (1,0,0,0), P2 (1,3,5,4), P3 (0,6,3,2), P4 (0,0,1,4). Max: P0…
- Disk cylinders 0–199, head at 100 moving toward 0. Requests: 23, 89, 132, 42, 187, 9, 155, 61. Under C-SCAN moving DOWN (service while…