CS FundamentalsVery hardGATE CS

A web server creates a new process per request using fork() (copy-on-write). Compared with creating a thread per request, which is the main extra cost of fork() that copy-on-write does NOT remove?

  1. A. Duplicating the page tables and kernel process structures, plus page faults on the first write to each shared page
  2. B. Copying the entire heap and stack byte by byte
  3. C. Reloading the program from disk
  4. D. Opening every file again

Correct answer: A. Duplicating the page tables and kernel process structures, plus page faults on the first write to each shared page

COW avoids copying page contents at fork time, but the kernel still copies page-table entries and the PCB and marks pages read-only; later writes trigger COW faults. Threads share all of this.

More Operating Systems questions

Exams that ask this topic