title: Threads vs Processes in Linux
body: <p>I've recently heard a few people say that in Linux, it is almost always better to use processes instead of threads, since Linux is very efficient in handling processes, and because there are so many problems (such as locking) associated with threads.  However, I am suspicious, because it seems like threads could give a pretty big performance gain in some situations.</p>
  
  <p>So my question is, when faced with a situation that threads and processes could both handle pretty well, should I use processes or threads?  For example, if I were writing a web server, should I use processes or threads (or a combination)?</p>