Feb. 12, 2012
10:24 p.m.
Den 12.02.2012 21:56, skrev Mike Meyer:
The reason those systems did this was because creating a process was *expensive*. That's also why the Multics folks looked at threads. The Unix fork/exec pair was cheap and flexible, allowing the creation of a command processor that supported easy backgrounding, pipes, and IO redirection. Fork has since gotten more expensive, in spite of the ongoing struggles to keep it cheap.
The "expensive" argument is also why the Windows API has no fork, although the Windows NT-kernel supports it. (There is even a COW fork in Windows' SUA.) I think fork() is the one function I have missed most when programming for Windows. It is the best reason to use SUA or Cygwin instead of the Windows API. Sturla