On 15/11/06, Matthew Gregan <[EMAIL PROTECTED]> wrote:
You can do that with processes, too. The major difference between threads and processes is that threads default to shared-everything, and processes default to shared-nothing. Unfortunately, it's almost impossible to start with threads and move towards a shared-nothing design, because you've given up all of the protection processes give you, and you can't add a lot of that that back without special hardware support.
As an aside, Linux has a (non-portable, as far as I know) clone system call which allows for finer control over which parts of a new cloned process are shared with the parent. man clone for the details. As a minor nit-pick, threads aren't quite shared-everything (point of execution isn't shared, obviously), and processes aren't quite shared-nothing (read-only code pages, for example). The nit-picks don't take anything away from your most valid point, though. Welcome back Matthew. Cheers, Carl.
