Re: Copy-on-Write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Feb 6, 2008 6:03 PM, Rajat Jain <Rajat.Jain@xxxxxxxxxxxx> wrote:
>
> Hi,
>
> >>
> >> I had read that the operating systems that use copy-on-write
> >> mechanism for fork(), it is better if they deliberately allow the
> >> CHILD to run first.
> >>
> >> This would be better because in 99% of the cases child will call
> >> exec() and the new address space will be allocated. Instead if the
> >> parent is executes first, an unnecessary copy of the pages is made
> >> (if parents writes) and later on when child executes, a fresh
> >> address space is executed.
> >>
> >> So in linux, is a child run first or the parent? Can we rely on this
> >> information?
> >
> > No with fork() it is not guaranteed.......however if you use vfork()
> > child is guaranteed to run first......
> >
>
> So as the author says, isn't running child first a good idea that needs to be implemented?
>

Not sure......I am getting a bit confused.....If implemented will
there be any issues in case of backward compatibility ?? ... For
example what will happen to daemon programs where typically parent
process exits after a fork() and rest of the code is taken care by the
child . In that case will there be an issue ???


> Thanks,
>
> Rajat
>



-- 
Thanks & Regards,
********************************************
Manish Katiyar  ( http://mkatiyar.googlepages.com )
3rd Floor, Fair Winds Block
EGL Software Park
Off Intermediate Ring Road
Bangalore 560071, India
***********************************************
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

[Index of Archives]     [Audio]     [Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux