public inbox for linux-newbie@vger.kernel.org
 help / color / mirror / Atom feed
From: "Manish Katiyar" <mkatiyar@gmail.com>
To: Rick Brown <rick.brown.3@gmail.com>
Cc: kernelnewbies <kernelnewbies@nl.linux.org>, linux-newbie@vger.kernel.org
Subject: Re: Copy-on-Write
Date: Wed, 6 Feb 2008 16:30:03 +0530	[thread overview]
Message-ID: <ea11fea30802060300y73391357icfa2a94e3ff7971@mail.gmail.com> (raw)
In-Reply-To: <7783925d0802052149g125a6497rabf866130edbaf78@mail.gmail.com>

On Feb 6, 2008 11:19 AM, Rick Brown <rick.brown.3@gmail.com> 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......

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



-- 
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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

  reply	other threads:[~2008-02-06 11:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-06  5:49 Copy-on-Write Rick Brown
2008-02-06 11:00 ` Manish Katiyar [this message]
2008-02-06 12:33   ` Copy-on-Write Rajat Jain
2008-02-06 12:41     ` Copy-on-Write Manish Katiyar
2008-02-06 13:17     ` Copy-on-Write Daniel Cheng
2008-02-07 15:30 ` Copy-on-Write Mulyadi Santosa
2008-02-07 23:46   ` Copy-on-Write Brandon Philips
2008-02-08  2:11     ` Copy-on-Write Renê
     [not found]     ` <5f9618380802071809v24f2be47xc9aea8664a8f8488@mail.gmail.com>
2008-02-13  5:44       ` Copy-on-Write Brandon Philips

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea11fea30802060300y73391357icfa2a94e3ff7971@mail.gmail.com \
    --to=mkatiyar@gmail.com \
    --cc=kernelnewbies@nl.linux.org \
    --cc=linux-newbie@vger.kernel.org \
    --cc=rick.brown.3@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox