title: How to differentiate between an RTOS and Linux?
body: <p>I've a QNX RTOS and Ubuntu 17.10 running. Problem is, other than the fact that QNX is an RTOS, I don't have any proof that it behaves like a RT system. What kind of application should I run on each OS which can give me a clear differentiation between the RT response of an RTOS and Ubuntu?</p>
  
  <p>I ran a signal handler(interrupt handler) program on both to see which one would catch the interrupt first.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;signal.h&gt;
  #include &lt;pthread.h&gt;
  
  void sig_hand(int sig) {
      printf("signal received\n");
      exit(0);
  }
  
  void *sigfun(void *arg) {
      signal(SIGINT, sig_hand);
      while(printf("Thread running\n"));
      return NULL;
  }
  
  
  int main(void) {
      pthread_t th;
  
      pthread_create(&amp;th,NULL,sigfun,NULL);
      pthread_join(th,NULL);
  
      return 0;
  }
  </code></pre>
  
  <p>I expect that while a thread keeps printing <code>Thread Running</code>, QNX will fetch the interrupt and stop the thread faster compared to Ubuntu. However, I see no difference and probably this is not the right application to find out the faster RT response.
  Can anyone suggest me a better way to clearly differentiate between an RTOS and Ubuntu?</p>