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?
- A. Duplicating the page tables and kernel process structures, plus page faults on the first write to each shared page
- B. Copying the entire heap and stack byte by byte
- C. Reloading the program from disk
- 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
- vfork() differs from fork() in that:
- Which inter-process communication mechanism does NOT need the kernel to copy the data between the two processes for each message?
- A pipe has capacity 64 KB. A writer process writes 100 KB with a single write() call while no process ever reads from the pipe. What…
- A process ignores SIGINT and then calls exec() to run a new program. Which statement is correct?
- Which signals can neither be caught nor ignored by a process?
- How many of these statements about microkernels are correct? 1. Device drivers and file systems typically run in user space as servers. 2…