title: Does linux schedule a process or a thread?
body: <p>After reading <a href="https://stackoverflow.com/questions/9154671/distinction-between-processes-and-threads-in-linux">this</a> SO question I got a few doubts. Please help in understanding.</p>
  
  <p>Scheduling involves deciding when to run a process and for what quantum of time.</p>
  
  <ol>
  <li><p>Does linux kernel schedule a thread or a process? As process and thread are not differentiated inside kernel how a scheduler treats them? </p></li>
  <li><p>How quantum for each thread is decided?
   a. If a quantum of time (say 100us) is decided for a process is that getting shared between all the threads of the process? or
   b. A quantum for each thread is decided by the scheduler?</p></li>
  </ol>
  
  <p>Note: Questions 1 and 2 are related and may look the same but just wanted to be clear on how things are working posted them both here.</p>