CS FundamentalsVery hardGATE CS (PYQ pattern)
A system uses LRU with 3 frames (initially empty). A dirty page is written back to disk only when it is evicted; a page is dirty if it was written (W) while resident, and a page loaded by a write is dirty. Pages are not written back when the program ends. References (R = read, W = write): 1R, 2W, 3R, 1W, 4R, 2R, 5W, 1R, 3W, 2R, 4W, 5R. How many disk transfers (page-ins plus write-backs) occur?
- A. 15
- B. 11
- C. 17
- D. 13
Correct answer: A. 15
LRU gives 11 page-ins; tracking the dirty bit of each evicted victim gives 4 write-backs; total 15.
More Operating Systems questions
- LFU replacement with 3 frames (initially empty): the victim is the resident page with the smallest reference count since it was loaded…
- Working-set window Δ = 5 references: WS(t) is the set of distinct pages among the 5 most recent references up to and including time t…
- Semaphores x = 0, y = 0. P1: print a; signal(x); wait(y); print b. P2: wait(x); print c; signal(y); print d. P3: print e. All three start…
- A Unix file system uses 4 KB blocks, 4-byte pointers and inodes with 12 direct pointers, one single-, one double- and one triple-indirect…
- Eight disks can be arranged as RAID 1+0 (4 mirrored pairs, striped together) or as RAID 0+1 (two 4-disk stripe sets, the second mirroring…
- Assume every fork() succeeds (it returns a non-zero value in the parent and 0 in the child) and each process prints X once when it reaches…