CS FundamentalsVery hardGATE CS (PYQ pattern)
Page-fault-frequency control with threshold T = 3: on a fault at time t, if more than 3 time units passed since the previous fault, all resident pages NOT referenced since the previous fault are removed, then the faulting page is added; otherwise the faulting page is simply added. Memory is initially empty, the previous-fault time starts at 0, and hits mark a page referenced. References at times 1 to 22: 1, 2, 3, 1, 2, 3, 4, 4, 4, 4, 4, 5, 5, 5, 1, 6, 6, 6, 6, 6, 6, 2. What is the resident-set size after the last reference, and the maximum size reached?
- A. final 3, maximum 4
- B. final 2, maximum 4
- C. final 2, maximum 5
- D. final 1, maximum 4
Correct answer: B. final 2, maximum 4
Applying the rule at each fault gives a maximum resident set of 4 pages and a final set of 2.
More Operating Systems questions
- A disk head is at cylinder 50 at t = 0, moving towards higher cylinders, and needs 1 time unit per cylinder (service itself is…
- Round Robin with quantum 3 ms, three processes arriving at t = 0 with bursts (CPU, I/O, CPU) in ms: P0 (5, 4, 4), P1 (3, 6, 3), P2 (6, 2…
- Process P0 has 4 pages, each in its own frame. Copy-on-write fork is used (a frame is copied only when written while shared; a written…
- Shared x = y = 0. Thread 1: x = 1; y = 1. Thread 2: r1 = y; r2 = x. Thread 3: x = 2; r3 = x. Under sequential consistency, how many…
- A Unix file system contains only these names: directories /, /a, /a/b and /c, a regular file /a/f, and /c/g, which is a hard link to /a/f…
- A user-mode process accesses virtual pages with page-table entries (present, writable, user-accessible): page 0 (1,1,1), page 1 (1,0,1)…