CS FundamentalsVery hardGATE CS
The reference string at times 1–12 is 3, 5, 3, 8, 2, 5, 5, 9, 3, 9, 2, 2. With a working-set window Δ = 5 references, what are the working-set sizes at t = 5 and at t = 10?
- A. 4 and 4
- B. 5 and 3
- C. 3 and 3
- D. 4 and 3
Correct answer: D. 4 and 3
At t = 5 the window holds references 1–5: {3, 5, 8, 2}, size 4. At t = 10 it holds 6–10: 5, 5, 9, 3, 9, so {5, 9, 3}, size 3. The window counts references, not distinct pages, and repeats appear once in the set.
More Operating Systems questions
- A device delivers data at 2 MB/s. Per-byte interrupts would cost 5 µs each; instead DMA moves 4 KB blocks and raises one interrupt per…
- A TLB has 64 entries. A program randomly touches a 100 MB data set. What is the TLB reach with 4 KB pages and with 2 MB huge pages, and…
- A spin lock is built from an atomic test-and-set: while (TestAndSet(&lock)) ; / critical section / lock = false;. Which property does it…
- Processes (arrival, burst): P1 (0, 8), P2 (1, 4), P3 (2, 9), P4 (3, 5), P5 (6, 2). Under SRTF (preemptive SJF; a running process keeps the…
- Round Robin with quantum 3; processes (arrival, burst): A (0, 7), B (2, 4), C (4, 6), D (5, 3). A process arriving at the same moment…
- Preemptive priority scheduling (smaller number = higher priority; a running process is not preempted by an equal priority). Processes…