CS FundamentalsHardWipro · Cognizant technical pattern
Working-set window Δ = 4 references. Reference string (times 1 to 10): 1, 2, 1, 3, 4, 4, 3, 5, 1, 2. What is the working set at time 6 (covering references 3 to 6)?
- A. {1, 3, 4}
- B. {1, 2, 3, 4}
- C. {3, 4}
- D. {4, 3, 5}
Correct answer: A. {1, 3, 4}
References 3–6 are 1, 3, 4, 4, so the distinct pages are {1, 3, 4} (size 3). Including page 2 uses a window of 5; {4, 3, 5} looks at references 6–8 instead.
More Operating Systems questions
- In a two-process mutual-exclusion attempt, each process sets its own flag to true and then waits while the other’s flag is true; there is…
- A system runs 4 independent processes, each spending 80% of its time waiting for I/O. Assuming waits are independent, what is the…
- Processes (arrival, burst, priority — lower number is higher priority): P1 (0, 5, 3), P2 (1, 3, 1), P3 (2, 4, 4), P4 (4, 2, 2). Under…
- int A[256][256] is stored in row-major order, and a page holds 512 ints (two rows). The process has only ONE frame for A, initially empty…
- Processes (times in ms): A (arrival 0, burst 9), B (arrival 1, burst 4), C (arrival 3, burst 6), D (arrival 5, burst 2), E (arrival 8…
- Processes (times in ms): A (arrival 0, burst 9), B (arrival 1, burst 4), C (arrival 3, burst 6), D (arrival 5, burst 2), E (arrival 8…