This is somewhat of a misnomer - Whilst early versions of UNIX typically copied each writable page of the parent's address space to a corresponding page of the child's address space, modern operating systems typically implement fork() using copy-on-write. With this implementation, parent and child are able to share the same page until either the parent or child write to the page, thereby minimising the number of pages which need to be copied between the address spaces and reducing memory requirements.
Additionally, there is little distinction in this article between threading implementations. The history of thread implementation has been littered with proprietary implementations from differing vendors for different platforms, and indeed, whilst the implementation of POSIX threads in C may be considered relatively cheap, the implementation of threads in Perl most certainly is not. The implementation of threads in Perl carries with it much overhead which is carried at all times within a threaded interpreter, not merely when threading is employed - For a quick example, take a look at the additional overhead required for threading in the perl_construct and perl_destruct methods in perl.c.
In short, this is a very poor discussion piece - The article has been presented with the guise that it provides an unbiased overview of the differences between threaded and fork-based concurrent programming models, yet in delivery, this article shows both poor research and a biased presentation. A better understanding of the advantages and disadvantages of these concurrent programming models I believe can be attained from some of the replies in this thread and some independent research.
In reply to Re: Why use threads over processes, or why use processes over threads?
by Anonymous Monk
in thread Why use threads over processes, or why use processes over threads?
by pg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |