in reply to using parallel processing to concatenate a string, where order of concatenation doesn't matter

fork() is part of UNIX architecture, and creates a new process. It is also a Perl built-in and is emulated in Activestate Perl on Windows as creation of a new thread, which might be confusing you. So, which OS?
A process has its own area of virtual memory, and no one else can access that (unless invited). A process is an instance of a running program, but is also a container for threads, in that all threads share the same virtual memory area (process address space). So they can stomp on each other if you are not careful.
Processes are slow to create and destroy, but are robust. Communication between processes is (relatively) slow, because it involves a kernel call. Threads are faster to create and destroy, and provide faster communication between them, but are more difficult to program because you always have to remember that all threads use the same (off-stack) data areas.
  • Comment on Re: using Paralell::ForkManager to concatenate a string, where order of concatenation doesn't matter

Replies are listed 'Best First'.
Re^2: using Paralell::ForkManager to concatenate a string, where order of concatenation doesn't matter
by tphyahoo (Vicar) on Oct 18, 2006 at 11:24 UTC
    I'm on unix.

    And I see now that I can't do what I want using forks, and probably need threads. (see update).