title: How to protect my working thread from being preempted by system processes?
body: <p>I'm working on some AR Game which contains three major modules:</p>
  
  <ul>
  <li>an AVCaptureSession to capture video frame data</li>
  <li>an Algorithm module</li>
  <li>a Render Engine</li>
  </ul>
  
  <p>The routine of app is very simple:</p>
  
  <ul>
  <li>obtain one frame of data from AVCaptureVideoDataOutput, then pass it to algorithm module</li>
  <li>algorithm module processes frame data on its own dispatch queue, then pass the results to render engine</li>
  <li>render engine uses the results to update whole virutal scene</li>
  </ul>
  
  <p>Each module has its own working thread (or dispatch queue), but only one module is active because they work serially.</p>
  
  <p>The problem is when the app run on some low level devices (like iPhone6), the fps is not stable. After profiling, I found that sometimes, both cpu cores are occupied by some system process (like medieserverd, backboardd ...) and my working threads could be preempted for a long time (like 10ms or even longer)</p>
  
  <p>Is there any way to make sure my working thread can occupy at least one cpu core?</p>
  
  <p>Now I'm using dispatch queues to organize my work tasks. Will it be better to use NSThread directly?</p>