note 68318 added to function.pcntl-fork
| From: | Jeff at osu1 dot php dot net | Date: | Fri, 21 Jul 2006 21:45:45 +0000 |
| Subject: | note 68318 added to function.pcntl-fork | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115032@lists.php.net to get a copy of this message | ||
In response to Jon Dowland, a fork is actually not that expensive of an operation. Yes, a fork
creates a copy of the process, so you would think it would be an expensive operation, but instead
operating systems implement what is known as "copy-on-write." Instead of actually making a
copy of the data, both processes reference the same data as long as they're only reading from
it. Once a process goes to write to the data, then the child process gets its own copy of it. So,
the majority of the PHP engine would not have to be copied and thus this would not be very
expensive.
----
Server IP: 216.194.113.175
Probable Submitter: 209.131.61.1
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.pcntl-fork.php
Edit -- http://master.php.net/note/edit/68318
Del: integrated -- http://master.php.net/note/delete/68318/integrated
Del: useless -- http://master.php.net/note/delete/68318/useless
Del: bad code -- http://master.php.net/note/delete/68318/bad+code
Del: spam -- http://master.php.net/note/delete/68318/spam
Del: non-english -- http://master.php.net/note/delete/68318/non-english
Del: in docs -- http://master.php.net/note/delete/68318/in+docs
Del: other reasons-- http://master.php.net/note/delete/68318
Reject -- http://master.php.net/note/reject/68318
Search -- http://master.php.net/manage/user-notes.php