CS FundamentalsVery hardGATE CS
Reference string: 1, 2, 1, 3, 1, 2, 4, 5, 4, 2, 5, 3, 4, 2, 3 frames, initially empty. LFU replacement is used: the victim is the resident page with the smallest reference count, counts are kept only while a page is resident (reset to 1 when it is loaded again), and ties go to the page loaded earliest. How many faults occur?
- A. 10
- B. 9
- C. 8
- D. 6
Correct answer: B. 9
Simulating with per-residency counts and FIFO tie-breaking gives 9 faults; LRU gives 8 and OPT 6 on the same string.
More Operating Systems questions
- Reference string: 0, 4, 1, 4, 2, 4, 3, 4, 2, 4, 0, 4, 1, 4, 2, 4, 3, 4. How many page faults does LRU give with 2, 3, 4 and 5 frames…
- TLB access 2 ns (looked up first), memory access 50 ns, two-level page table, TLB hit ratio 98%. A fraction 10⁻⁵ of ALL accesses…
- A machine has 57-bit virtual addresses (5-level paging style), 4 KB pages and 8-byte page-table entries, with every page table fitting in…
- A system has 46-bit virtual addresses, 16 KB pages and 4-byte PTEs; each page table must fit in one page. How many levels of page tables…
- Segment table (base, length): S0 (219, 600), S1 (2300, 14), S2 (90, 100), S3 (1327, 580), S4 (1952, 96). What are the physical addresses…
- How many times are 'c' and 'p' printed in total? (Every fork() succeeds.) c int main() { for (int i = 0; i < 3; i++) { if (fork() == 0)…