CS FundamentalsVery hardGATE CS
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 newly loaded page gets reference bit 1, a hit sets the bit to 1, and the hand starts at frame 0 and advances past each frame it replaces, how many page faults occur?
- A. 8
- B. 14
- C. 6
- D. 9
Correct answer: D. 9
Simulating the hand, which clears reference bits until it finds a 0, gives 9 faults; hits set bits that change which page survives. Plain FIFO on this string gives 8, 14 counts every reference, and 6 counts only the cold misses of the six distinct pages.
More Operating Systems questions
- 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…
- A system has a 3-level page table and a TLB. TLB lookup = 20 ns, memory access = 100 ns, TLB hit ratio = 95%. The TLB is searched before…
- Memory access time is 100 ns, average page-fault service time is 8 ms, and the page-fault rate is 1 in 100,000 accesses. Ignoring TLB…
- Memory access takes 200 ns and a page fault takes 10 ms to service. To keep the effective access time within 10% of the memory access…