title: Forking vs Threading
body: <p>I have used threading before in my applications and know its concepts well, but recently in my operating system lecture I came across fork(). Which is something similar to threading.</p>
  
  <p>I google searched difference between them and I came to know that:</p>
  
  <ol>
  <li>Fork is nothing but a new process that looks exactly like the old or the parent process but still it is a different process with different process ID and having  it’s own memory.</li>
  <li>Threads are light-weight process which have less overhead</li>
  </ol>
  
  <p>But, there are still some questions in my mind.</p>
  
  <ol>
  <li>When should you prefer fork() over threading and vice-verse?</li>
  <li>If I want to call an external application as a child, then should I use fork() or threads to do it?</li>
  <li>While doing google search I found people saying it is bad thing to call a fork() inside a thread. why do people want to call a fork() inside a thread when they do similar things?</li>
  <li>Is it True that fork() cannot take advantage of multiprocessor system because parent and child process don't run simultaneously?</li>
  </ol>