9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: steve.kilbane@ind.alstom.com steve.kilbane@ind.alstom.com
Subject: [9fans] spawn() vs fork()
Date: Mon,  5 Jul 1999 08:57:49 +0100	[thread overview]
Message-ID: <19990705075749.-d-F87DNggWDwB6qau1uN6_JSiYPjykymsekjykmOW8@z> (raw)



On 03/07/99 16:22:21 Digby Tarvin  wrote:

> That compromise meant that a fork() style of process creation
> was not possible (all pointers in the child's data segment would
> be pointing into the parents memory), so it uses a spawn() style
> of process creation.

It's not impossible: the Atari ST port of Minix managed fork() on M68000. I
believe the solution was to swap data and stack segments during a context
switch. This meant that anything that forked a child and then talked to it for a
while would run like treacle. Since most processes followed a fork() with an
exec(), it wasn't so much of a problem. All very reminiscent of vfork().

Implementation requirements aside, as Jean says, fork gives you an elegant way
of setting up I/O redirection. It also gives you an elegant way of determining
start-up context as a whole for the new process., including internal state.

steve






             reply	other threads:[~1999-07-05  7:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-05  7:57 steve.kilbane [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-07-05 13:23 Digby
1999-07-05  9:09 rog
1999-07-03 15:22 Digby
1999-07-03 10:23 Jean
1999-07-03  9:53 Guan

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=19990705075749.-d-F87DNggWDwB6qau1uN6_JSiYPjykymsekjykmOW8@z \
    --to=steve.kilbane@ind.alstom.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;
as well as URLs for NNTP newsgroup(s).