🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.arch
Article #2856

re:vfork

#2856
From: D.CHEN
Date: Tue, 16 Sep 1986 03:03
24 lines
1605 bytes
> Another case peculiar to Unix systems is VFORK. Why duplicate
> the whole address space when the most likely thing to do next
> is EXEC, which will clobber the space you just copied?

at&t demand paging versions of unix now default to this type of
fork.  the pages of private regions of a process' address space
are not copied on fork.  instead, they are marked copy-on-write
and any attempt to modify the pages by either the parent or the
child will result in a fault which will then copy the page for
the process.

but things are not as dandy as they seem.  there is not much savings
if the process (either parent or child) goes and attempts to modify
pages before the exec.  since most children are the ones to exec,
this can be "cured" by allowing the child to execute first after
the exec.  however, the child will modify a surprising number of pages
before it execs.  thus the copy-on-write fault handler overhead
can exceed the overhead of copying pages.  the benefits of this
type of fork is both system and "shell-dependent" (of course address
reordering of the shell may improve the situation).

danny chen
ihnp4!hou2b!dwc
Technical Details
Message-ID: <831@hou2b.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!caip!princeton!allegra!ulysses!mhuxr!mhuxt!houxm!hou2b!dwc

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!caip!princeton!allegra!ulysses!mhuxr!mhuxt!houxm!hou2b!dwc
From: dwc@hou2b.UUCP (D.CHEN)
Newsgroups: net.arch
Subject: re:vfork
Message-ID: <831@hou2b.UUCP>
Date: Mon, 15-Sep-86 23:03:22 EDT
Article-I.D.: hou2b.831
Posted: Mon Sep 15 23:03:22 1986
Date-Received: Tue, 16-Sep-86 21:57:57 EDT
Organization: AT&T Bell Labs, Holmdel NJ
Lines: 25