Hi,
The book Linux Kernel Development mentions a certain overhead which is
reduced in linux because the child is made to run first after it is
forked (instead of the parent) and if the child executes the exec
system call.

Quoting Pg 32 (2nd edition):
"In do_fork() the child is woken up and run. Deliberately the kernel
runs the child process first. In the common case of the child simply
calling exec() immediately, this eliminates any copy-on-write overhead
that would occur if the parent ran first and began writing to the
address space"

How does running exec() in child more efficient than having
copy-on-write trigger in the parent?

Let me know if my question is clear, or if I should rephrase.

Thanks!
-Joel

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to