Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: spawning Perl scripts

by jasonk (Parson)
on Mar 28, 2003 at 17:58 UTC ( [id://246525]=note: print w/replies, xml ) Need Help??


in reply to Re: spawning Perl scripts
in thread spawning Perl scripts

On a decent OS, fork doesn't actually copy the entire process, it creates a new process table entry, with process id and all the associated information, but the actual memory pages that contain the memory contents of the two processes are shared until one of the processes attempts to change that memory (a procedure known as copy-on-write). So the actual overhead of forking is minimal, and you won't get multiple copies of even a small portion of the entire apache process, unless one of the processes manages to make a change to it's memory in that tiny amount of time between the fork() and exec() calls, and even then you will only get short-lived copies of the memory pages that actually changed, not the entire process.


We're not surrounded, we're in a target-rich environment!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://246525]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-25 21:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found