CS FundamentalsVery hardGATE CS (PYQ pattern)
A system uses the clock (second-chance) page replacement with 4 frames. Initially all frames are empty; a page has its reference bit set to 1 when loaded and when hit. The hand advances past the frame it just filled. Reference string: 2 5 4 4 3 5 6 6 5 3 5 2 3 5 1 3. How many page faults occur?
- A. 6
- B. 8
- C. 7
- D. 9
Correct answer: B. 8
Simulating the clock hand with reference bits gives 8 faults. For comparison on the same string OPT gives 6, LRU 7 and FIFO 9, so the clock result lies between LRU and FIFO.
More Operating Systems questions
- Memory access takes 200 ns. A page fault on a clean victim takes 8 ms to service and on a dirty victim 20 ms; 40% of victims are dirty…
- A system has 48-bit virtual addresses, 8 KB pages and 16 GB of physical memory. An inverted page table has one entry per frame, holding a…
- A FAT file system on a 2 TB partition uses 8 KB blocks. Each FAT entry holds a block number plus 4 control bits and entries are rounded up…
- A Unix-style inode has 10 direct pointers and one single, one double and one triple indirect pointer. Blocks are 2 KB and pointers are 4…
- A 32-bit machine uses two-level paging with 4 KB pages and 4-byte entries (10+10+12 split). A process has 6 MB of code and data starting…
- A machine has 46-bit virtual addresses, 16 KB pages, 40-bit physical addresses, and each page-table entry holds the frame number plus 6…