CS FundamentalsHardGATE CS (PYQ pattern)

Which of the following statements about fork() with copy-on-write are correct? I. Right after fork, parent and child map the same physical frames, marked read-only in both page tables. II. A write to a shared page raises a protection fault whose handler copies the page. III. Demand-zero pages let a fresh heap be allocated without any disk read. IV. The child's physical memory consumption doubles immediately at fork.

  1. A. I and II only
  2. B. II, III and IV only
  3. C. I, III and IV only
  4. D. I, II and III only

Correct answer: D. I, II and III only

IV is false: only pages that are actually written get copied, so fork followed by exec costs very little memory. I-III describe the standard mechanism.

More Operating Systems questions

Exams that ask this topic