CS FundamentalsVery hardGATE CS
A process's working set grows from 40 to 70 pages while it holds 50 frames under local replacement, and the system has 10 free frames. What is the best response under the working-set model?
- A. Keep it at 50 frames and let local replacement cope with the growth
- B. Give it the 10 free frames, so that it reaches 60 frames
- C. Take frames from the other running processes until it has 70
- D. Swap out some process so this one gets all 70 frames
Correct answer: D. Swap out some process so this one gets all 70 frames
The working-set model says a process should run only with its whole working set resident; with 60 frames it would still thrash. If total demand exceeds memory, the OS suspends some process and gives its frames to others.
More Operating Systems questions
- SRTF scheduling (on a tie the running process continues); processes (arrival, burst): P1 (0, 7), P2 (2, 4), P3 (4, 1), P4 (5, 4), P5 (9…
- A loop references pages 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4 with 3 frames, initially empty. How many faults occur under FIFO, LRU and OPT?
- Banker's algorithm, resources (A, B, C). Available = (1, 1, 2). Allocation / Max: P0 (1,0,1)/(2,1,2), P1 (2,1,0)/(3,2,2), P2…
- How many times is x printed? (Every fork() succeeds, and each print is an unbuffered write.) c int main() { fork(); fork() && fork()…
- How many numbers are printed, and what is their sum? (Every fork() succeeds, and each print is an unbuffered write.) c int main() { for…
- Which letters are printed, and how many times each? (Every fork() succeeds, and each print is an unbuffered write.) c int main() { if…