title: Creating threads with different scheduling priorities
body: <p>First-time C user here. I've been learning to create basic C programs, and my professor gave us our first big assignment and I'm hopelessly lost.</p>
  
  <p>for part of it, I'm supposed to create three different threads with <code>SCHED_OTHER</code>, <code>SCHED_RR</code>, and <code>SCHED_FIFO</code> as their respective scheduling priorities. 
  Each of these 3 threads will wait for the "main" thread to signal that they should start running a "task".</p>
  
  <p>This task is a function call with non-yielding and non-blocking instructions that should take 5 to 10 seconds to complete.</p>
  
  <p>So basically, two questions:</p>
  
  <ul>
  <li><p>How to I create a thread in C with a defined priority(<code>SCHED_OTHER</code>, <code>SCHED_RR</code>, or <code>SCHED_FIFO</code>) (how do I use <code>pthread_create()</code>?)</p></li>
  <li><p>How would I go about writing these tasks? (pseudocode is fine)</p></li>
  </ul>