title: How does the kernel separate threads from processes
body: <p>Suppose I have a browser process like Firefox, that has pid = 123. Firefox has 5 opened tabs each running in a separate thread, so in total it has 5 threads.</p>
  
  <ol>
  <li><p>So I want to know in depth, how the kernel will separate the process into the thread to execute in <code>struct task_struct</code> or in the thread_info.</p></li>
  <li><p>Like <code>struct task_struct</code> is a task descriptor of the task list.
  where does <code>struct task_struct</code> contain a reference or a link to these five threads.</p></li>
  <li><p>Does the <code>struct thread_struct</code> of a process like Firefox contain reference to all the 5 thread </p>
  
  <p><strong>OR</strong></p>
  
  <p>each thread is treated like a process inside the Linux kernel.</p></li>
  </ol>