CS FundamentalsHardGATE CS (PYQ pattern)
A parent has 1000 pages mapped copy-on-write after fork, all initially shared. The child then writes to 100 distinct pages, and afterwards the parent writes to 50 pages, of which 20 are among the pages the child already wrote. Assuming a copy is made only when a write finds a page shared by more than one process, how many physical frames hold the data in total?
- A. 1130
- B. 1100
- C. 1150
- D. 1170
Correct answer: A. 1130
The child's 100 writes create 100 new frames. The parent's 20 writes to pages already copied by the child find a reference count of 1 and need no copy; its other 30 writes need copies. Total = 1000 + 100 + 30 = 1130.
More Operating Systems questions
- A bounded-buffer monitor with Mesa-style signalling uses: get() { if (count == 0) wait(notEmpty); item = buf[out]; count--; ... } and…
- A three-level feedback queue: Q0 (quantum 2), Q1 (quantum 4), Q2 (FCFS). New processes join Q0 and preempt lower queues; a process that…
- The reference string of a process is 1 2 1 3 4 4 5 2 3 2 2 6 7 7 6 1. Using a working-set window of the last 5 references (including the…
- The page reference string is 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6 and 3 frames are available (initially empty). The numbers of page…
- Five processes arrive with burst times: P1 (arrival 0, burst 8), P2 (1, 4), P3 (2, 9), P4 (3, 5), P5 (4, 2). Under preemptive SJF (SRTF)…
- A system has 3 resource types and processes P0-P3. Allocation: P0 (1,0,1), P1 (2,1,0), P2 (1,1,1), P3 (0,1,2). Maximum: P0 (3,2,2), P1…